Expand_as RuntimeError in torch_scatter
Opened this issue · 4 comments
Hi, I am running your code. And I am inheritanting Messagepassing in pytorch_geometric to create my own graph conv, but I face the error below. To be exact, it occurs in function propagate
, and I sent edge_index
(shape: 2, edge_num) and x
(shape: num_node, 128) into propagate
. And I try my code on both linux and win. And they occurred the same problems. Note that I use the famous dataset Cora
use the code dataset = Planetoid(path, 'Cora', transform=T.NormalizeFeatures())
My Environment:
PyG version: 2.0.3
PyTorch version: 1.9.1
OS: Ubuntu x86_64
Python version: 3.8.12
CUDA/cuDNN version: 11.1
How you installed PyTorch and PyG (conda, pip, source): source
Any other relevant information (e.g., version of torch-scatter): torch-scatter: 2.0.9; torch-sparse: 0.6.12
Hi, can you use the following version:
PyTorch >= 1.4.0
PyG >=1.4.0,<=1.5.1
Other versions of PyG will likely have some inconsistencies since the APIs of PyG and torch-scatter, etc. has changed a lot.
Thanks,
May I know how to specify the version of PyG?
According to the official install document from the PyG website, it is
pip install pyg-lib torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-1.13.0+cu116.html
Can you show the command how to install a version with PyG=1.5.0?
Thank you very much!
Hi, from the prior version of the README in the PyG repo, https://github.com/pyg-team/pytorch_geometric/tree/f7c0591007fdf8cf7faac16c0b865900318dde0a,
You can find how to install older versions of PyG. For example,
pip install torch-scatter==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.5.0.html
pip install torch-sparse==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.5.0.html
pip install torch-cluster==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.5.0.html
pip install torch-spline-conv==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.5.0.html
pip install torch-geometric==1.5.0
Replace ${CUDA} with cu102 for example.
This will need that pytorch version of 1.5.0. I'm not sure whether the above commands still works. Another possibility is to install latest version of the PyG, but then may need to adapt to the new API so that it can work.
May I know how to specify the version of PyG? According to the official install document from the PyG website, it is
pip install pyg-lib torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-1.13.0+cu116.html
Can you show the command how to install a version with PyG=1.5.0? Thank you very much!
I have the same problem. Have you solved this problem? @emma-sjwang