Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Batch operation #13

Open
lonelygoatherd opened this issue Aug 5, 2020 · 1 comment
Open

Batch operation #13

lonelygoatherd opened this issue Aug 5, 2020 · 1 comment

Comments

@lonelygoatherd
Copy link

lonelygoatherd commented Aug 5, 2020

Hi, thank for sharing the codes. In the networks.py, what does the variable "data.batch" denote in the forward method? I have looked up to pyg document, and found neither Data nor DataLoader has "batch" attribute. So what is the difference of it with the input x?
你好,请问networks里的forward函数,x和batch有什么不同呢,data有batch属性吗?找了半天没找到,但是运行都可以

@icecat2012
Copy link

I think the 'batch' variable is for the global_max_pool and global_mean_pool functions (readout).
x1 = torch.cat([gmp(x, batch), gap(x, batch)], dim=1)

see pytorch geometric doc

batch (LongTensor) – Batch vector, which assigns each node to a specific example.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants