Skip to content
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

Expand_as RuntimeError in torch_scatter #4

Open
tjb-tech opened this issue Oct 15, 2022 · 4 comments
Open

Expand_as RuntimeError in torch_scatter #4

tjb-tech opened this issue Oct 15, 2022 · 4 comments

Comments

@tjb-tech
Copy link

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())

Linux:
J4U6NM5}) )(0RA2LZBQG8K

Win:
L9~ GBZ1WKSA{{0S1W M08Q

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

@tailintalent
Copy link
Collaborator

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,

@emma-sjwang
Copy link

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!

@tailintalent
Copy link
Collaborator

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.

@sty945
Copy link

sty945 commented Feb 23, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants