-
Notifications
You must be signed in to change notification settings - Fork 143
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
bug #2
Comments
Hi, would you mind sharing a more detailed(or complete) traceback log? Thanks. |
Thank you for your open code. I have the same problem with m3ditatioin. Traceback (most recent call last):
File "D:/迅雷下载/GDN/GDN/main.py", line 259, in
main.run()
File "D:/迅雷下载/GDN/GDN/main.py", line 109, in run
self.train_log = train(self.model, model_save_path,
File "D:\迅雷下载\GDN\GDN\train.py", line 69, in train
out = model(x, edge_index).float().to(device)
File "C:\Users\Administrator.conda\envs\torch-geo\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(input, **kwargs)
File "D:\迅雷下载\GDN\GDN\models\GDN.py", line 163, in forward
gcn_out = self.gnn_layers[i](x, batch_gated_edge_index, node_num=node_numbatch_num, embedding=all_embeddings)
File "C:\Users\Administrator.conda\envs\torch-geo\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\迅雷下载\GDN\GDN\models\GDN.py", line 73, in forward
out, (new_edge_index, att_weight) = self.gnn(x, edge_index, embedding, return_attention_weights=True)
File "C:\Users\Administrator.conda\envs\torch-geo\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\迅雷下载\GDN\GDN\models\graph_layer.py", line 66, in forward
out = self.propagate(edge_index, x=x, embedding=embedding, edges=edge_index,
File "C:\Users\Administrator.conda\envs\torch-geo\lib\site-packages\torch_geometric\nn\conv\message_passing.py", line 237, in propagate
out = self.message(**msg_kwargs)
File "D:\迅雷下载\GDN\GDN\models\graph_layer.py", line 112, in message
alpha = softmax(alpha, edge_index_i, size_i)
RuntimeError: softmax() Expected a value of type 'Optional[Tensor]' for argument 'ptr' but instead found type 'int'.
Position: 2
Value: 3456
Declaration: softmax(Tensor src, Tensor? index, Tensor? ptr=None, int? num_nodes=None) -> (Tensor)
Cast error details: Unable to cast Python instance to C++ type (compile in debug mode for details)
Process finished with exit code 1 |
Hi, thanks for providing the log. I think this issue is caused by the mismatched pytorch-geometric version. Our code is using version 1.5.0. Pytorch-geometric has changed the Please try to reinstall the pytorch-geometric with 1.5.0 and rerun it. Thanks! |
Can you update the code to adapt with new latest version of geometric? |
@d-ailin @wjj5881005 modified in graph_layer.py
|
@iDestro Hello! Do you have solved this problem? |
Thanks for your help. |
very good! |
alpha = softmax(alpha, edge_index_i,size_i)
RuntimeError: softmax() Expected a value of type 'Optional[Tensor]' for argument 'ptr' but instead found type 'int'.
Position: 2
Value: 864
Declaration: softmax(Tensor src, Tensor? index=None, Tensor? ptr=None, int? num_nodes=None, int dim=0) -> (Tensor)
Cast error details: Unable to cast Python instance to C++ type (compile in debug mode for details)
The text was updated successfully, but these errors were encountered: