-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error occurs when starting training #6
Comments
I meet the problem too, try this: |
Thanks! |
I meet the same issue. |
Could anyone fix this problem with a more recent version of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I encounter such error when just running command "bash run.sh 0 msl". Any idea about it? Thanks!
Traceback (most recent call last):
File "main.py", line 256, in
main.run()
File "main.py", line 108, in run
self.train_log = train(self.model, model_save_path,
File "/media/home/jzhu/projects/GDN-main/train.py", line 70, in train
out = model(x, edge_index).float().to(device)
File "/media/home/jzhu/anaconda3/envs/py3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(input, **kwargs)
File "/media/home/jzhu/projects/GDN-main/models/GDN.py", line 167, in forward
gcn_out = self.gnn_layers[i](x, batch_gated_edge_index, node_num=node_numbatch_num, embedding=all_embeddings)
File "/media/home/jzhu/anaconda3/envs/py3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/media/home/jzhu/projects/GDN-main/models/GDN.py", line 73, in forward
out, (new_edge_index, att_weight) = self.gnn(x, edge_index, embedding, return_attention_weights=True)
File "/media/home/jzhu/anaconda3/envs/py3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/media/home/jzhu/projects/GDN-main/models/graph_layer.py", line 72, in forward
out = self.propagate(edge_index, x=x, embedding=embedding, edges=edge_index,
File "/media/home/jzhu/anaconda3/envs/py3/lib/python3.8/site-packages/torch_geometric/nn/conv/message_passing.py", line 253, in propagate
out = self.aggregate(out, **aggr_kwargs)
File "/media/home/jzhu/anaconda3/envs/py3/lib/python3.8/site-packages/torch_geometric/nn/conv/message_passing.py", line 287, in aggregate
return scatter(inputs, index, dim=self.node_dim, dim_size=dim_size,
File "/media/home/jzhu/anaconda3/envs/py3/lib/python3.8/site-packages/torch_scatter/scatter.py", line 153, in scatter
return scatter_sum(src, index, dim, out, dim_size)
File "/media/home/jzhu/anaconda3/envs/py3/lib/python3.8/site-packages/torch_scatter/scatter.py", line 11, in scatter_sum
index = broadcast(index, src, dim)
File "/media/home/jzhu/anaconda3/envs/py3/lib/python3.8/site-packages/torch_scatter/utils.py", line 13, in broadcast
src = src.expand_as(other)
RuntimeError: The expanded size of the tensor (1) must match the existing size (4320) at non-singleton dimension 1. Target sizes: [4320, 1, 64]. Tensor sizes: [1, 4320, 1]
The text was updated successfully, but these errors were encountered: