Hi, thanks for your code. But when I run python main.py --dataset PROTEINS, there is an error as follows:
Traceback (most recent call last):
File "main.py", line 99, in <module>
test_acc,test_loss = test(model,test_loader)
File "main.py", line 65, in test
out = model(data)
File "/home/colden/.conda/envs/tg/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__
result = self.forward(*input, **kwargs)
File "/home/colden/SAGPool/networks.py", line 45, in forward
x, edge_index, _, batch, _ = self.pool3(x, edge_index, None, batch)
File "/home/colden/.conda/envs/tg/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__
result = self.forward(*input, **kwargs)
File "/home/colden/SAGPool/layers.py", line 20, in forward
perm = topk(score, self.ratio, batch)
File "/home/colden/.conda/envs/tg/lib/python3.6/site-packages/torch_geometric/nn/pool/topk_pool.py", line 18, in topk
num_nodes = scatter_add(batch.new_ones(x.size(0)), batch, dim=0)
IndexError: dimension specified as 0 but tensor has no dimensions```
Can you help me to fix the bug? Thanks very much.