vincentcartillier / Semantic-MapNet

73 stars 11 forks source link

Unable to get repr for <class 'torch.Tensor'> #19

Closed Southyang closed 11 months ago

Southyang commented 11 months ago

When I execute demo.py, the error is RuntimeError: CUDA error: device-side assert triggered. After I debugged the code, I found that when the code was executed to line 129 of the model_test.py, the data all became Unable to get repr for < class'torch. Tensor '>. Why is that?

vincentcartillier commented 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

Southyang commented 11 months ago

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?

vincentcartillier commented 11 months ago

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
vincentcartillier commented 11 months ago

Yup to confirm, I just checked on a fresh conda env and was able to instable torch-scatter 1.4.0

Southyang commented 11 months ago

demo.py up and running! Thanks! It seems that the content of the official website is not completely credible!