QijinYin/scGraph

RuntimeError: INDICES element is out of DATA bounds, id=7432 axis_dim=64

dtgz-sudo opened this issue · 8 comments

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\221.5787.24\plugins\python\helpers\pydev\pydevd.py", line 1491, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Users\Administrator\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\221.5787.24\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/code/scGraph/src/scGraph.py", line 192, in
train_loss = train2(model,optimizer,train_loader,epoch,device,loss_fn,scheduler =scheduler )
File "D:/code/scGraph/src/scGraph.py", line 57, in train2
output = model(data)
File "D:\Program Files\Anacoda\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\code\scGraph\src\model.py", line 218, in forward
x = self.act1(self.conv1(x, edge_index,edge_weight=edge_weight))
File "D:\Program Files\Anacoda\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\code\scGraph\src\model.py", line 72, in forward
out2 = self.propagate(edge_index, size=size, x=x,
File "D:\Program Files\Anacoda\lib\site-packages\torch_geometric\nn\conv\message_passing.py", line 309, in propagate
coll_dict = self.collect(self.user_args, edge_index,
File "D:\Program Files\Anacoda\lib\site-packages\torch_geometric\nn\conv\message_passing.py", line 202, in collect
data = self.lift(data, edge_index, dim)
File "D:\Program Files\Anacoda\lib\site-packages\torch_geometric\nn\conv\message_passing.py", line 172, in lift
return src.index_select(self.node_dim, index)
RuntimeError: INDICES element is out of DATA bounds, id=7432 axis_dim=64

This problem occurs in the SAGEConv.forword method in model.py
out2 = self.propagate(edge_index, size=size, x=x,
edge_weight=edge_weight)

@dtgz-sudo hi,have you solve it,i have same problem

This problem occurs in the SAGEConv.forword method in model.py out2 = self.propagate(edge_index, size=size, x=x, edge_weight=edge_weight)
hello, have you solve it?

@dtgz-sudo hi,have you solve it,i have same problem

hello, have you solve it?

kk5kk commented

node_ Dim: Defines which dimension to propagate along. The default value is - 2, which is which dimension of the node representation tensor is the node dimension. The shape of the node representation tensor x is [num_nodes, num_features]. Its 0th dimension (also the 2nd dimension) is the node dimension, and its 1st dimension (also the 1st dimension) is the node representation dimension. Therefore, we can set the node_ Dim=- 2, but in this experiment, the shape of x is three-dimensional, so it needs to be specified as node_ dim = -3

hello, have you solve it?

hello, have you solve it?

@kk5kk node_ Dim: Defines which dimension to propagate along. The default value is - 2, which is which dimension of the node representation tensor is the node dimension. The shape of the node representation tensor x is [num_nodes, num_features]. Its 0th dimension (also the 2nd dimension) is the node dimension, and its 1st dimension (also the 1st dimension) is the node representation dimension. Therefore, we can set the node_ Dim=- 2, but in this experiment, the shape of x is three-dimensional, so it needs to be specified as node_ dim = -3

Can you tell me where to make the specific modifications? I didn't find the node_ dim

kk5kk commented