SAGPool
SAGPool copied to clipboard
Batch operation
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属性吗?找了半天没找到,但是运行都可以
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.