when I run fintune model, Imet this problem :
Traceback (most recent call last):
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/finetune_snap.py", line 244, in
main()
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/finetune_snap.py", line 218, in main
train(args, model, device, train_loader, optimizer,criterion)
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/finetune_snap.py", line 67, in train
pred = model(batch)
^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/model.py", line 294, in forward
node_representation = self.gnn(x, edge_index, edge_attr,node_seg,edge_seg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/model.py", line 226, in forward
x = gnn(x,edge_index,edge_attr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/model.py", line 178, in forward
attention_output = self.attention.forward(x, edge_index, edge_attr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/model.py", line 147, in forward
return self.propagate(edge_index, size=size, x=x, pseudo=pseudo)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch_geometric/nn/conv/message_passing.py", line 463, in propagate
out = self.message(**msg_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/model.py", line 158, in message
alpha = softmax(alpha, edge_index_i, size_i)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch_geometric/utils/softmax.py", line 56, in softmax
count = ptr[1:] - ptr[:-1]
_softmax error is usually due to a version issue with pytorch geometry. It is possible that you have used a higher version of pyg than the required environment. Please check.
when I run fintune model, Imet this problem : Traceback (most recent call last): File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/finetune_snap.py", line 244, in
main()
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/finetune_snap.py", line 218, in main
train(args, model, device, train_loader, optimizer,criterion)
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/finetune_snap.py", line 67, in train
pred = model(batch)
^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/model.py", line 294, in forward
node_representation = self.gnn(x, edge_index, edge_attr,node_seg,edge_seg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/model.py", line 226, in forward
x = gnn(x,edge_index,edge_attr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/model.py", line 178, in forward
attention_output = self.attention.forward(x, edge_index, edge_attr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/model.py", line 147, in forward
return self.propagate(edge_index, size=size, x=x, pseudo=pseudo)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch_geometric/nn/conv/message_passing.py", line 463, in propagate
out = self.message(**msg_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/home/xinxin/DDI_MPG/MPG/DDI/model.py", line 158, in message
alpha = softmax(alpha, edge_index_i, size_i)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yehlab/anaconda3/envs/DDI_MPG_python37/lib/python3.11/site-packages/torch_geometric/utils/softmax.py", line 56, in softmax
count = ptr[1:] - ptr[:-1]