Closed Southyang closed 11 months ago
Which pytorch and torch-scatter versions do you have?
Also, you can try running the code on CPU to allow for a more comprehensive error message.
You can switch device
to cpu here
When I switch to cpu,
Device = torch.device ("cpu")
The error message is:
IndexError: index 228721 is out of bounds for dimension 0 with size 228721
My torch version is 1.7.0
, and the torch-scatter version is 2.0.5
. 2.0.5
is the lowest version that can be installed on the 1.7.0
version of torch. The official website does not provide 1.4.0
torch-scatter.
Is there any work to be done other than preparing the dataset and pretraining the model?
I am aware of issues with torch-scatter versions 2.XX. However, the code was built with torch-scatter 1.4.0, so you should try to install this version.
I believe it should still be available here: https://pypi.org/project/torch-scatter/1.4.0/
pip install torch-scatter==1.4.0
Yup to confirm, I just checked on a fresh conda env and was able to instable torch-scatter 1.4.0
demo.py
up and running! Thanks! It seems that the content of the official website is not completely credible!
When I execute
demo.py
, the error isRuntimeError: CUDA error: device-side assert triggered
. After I debugged the code, I found that when the code was executed to line 129 of themodel_test.py
, the data all becameUnable to get repr for < class'torch. Tensor '>
. Why is that?