Closed KunLiu1210 closed 3 years ago
python main_classification.py --datasets openssl_min50
output: Traceback (most recent call last): File "/home/coder/project/python/graph_dl/H2MN/main_classification.py", line 116, in best_model = train() File "/home/coder/project/python/graph_dl/H2MN/main_classification.py", line 43, in train prediction = model(data) File "/home/coder/local/anaconda3/envs/pytorch_cpu/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "/home/coder/project/python/graph_dl/H2MN/models.py", line 75, in forward hyperedge1_cross_conv1, hyperedge2_cross_conv1 = self.cross_conv1(edge1_conv1, edge1_batch_pool1, edge2_conv1, edge2_batch_pool1) File "/home/coder/local/anaconda3/envs/pytorch_cpu/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(input, **kwargs) File "/home/coder/project/python/graph_dl/H2MN/layers.py", line 275, in forward new_edgeindex, = dense_to_sparse(adj) File "/home/coder/local/anaconda3/envs/pytorch_cpu/lib/python3.9/site-packages/torch_geometric/utils/sparse.py", line 13, in dense_to_sparse assert adj.size(-1) == adj.size(-2) AssertionError
Hi,
This is caused by the updating of dense_to_sparse in pytorch_geometric. I have updated the code. Please download the code again and re-run it.
python main_classification.py --datasets openssl_min50
output: Traceback (most recent call last): File "/home/coder/project/python/graph_dl/H2MN/main_classification.py", line 116, in
best_model = train()
File "/home/coder/project/python/graph_dl/H2MN/main_classification.py", line 43, in train
prediction = model(data)
File "/home/coder/local/anaconda3/envs/pytorch_cpu/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, *kwargs)
File "/home/coder/project/python/graph_dl/H2MN/models.py", line 75, in forward
hyperedge1_cross_conv1, hyperedge2_cross_conv1 = self.cross_conv1(edge1_conv1, edge1_batch_pool1, edge2_conv1, edge2_batch_pool1)
File "/home/coder/local/anaconda3/envs/pytorch_cpu/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(input, **kwargs)
File "/home/coder/project/python/graph_dl/H2MN/layers.py", line 275, in forward
new_edgeindex, = dense_to_sparse(adj)
File "/home/coder/local/anaconda3/envs/pytorch_cpu/lib/python3.9/site-packages/torch_geometric/utils/sparse.py", line 13, in dense_to_sparse
assert adj.size(-1) == adj.size(-2)
AssertionError