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

Error: Expected object of type torch.cuda.LongTensor but found type torch.cuda.IntTensor for argument #2 'other' #4

Open
nickjyj opened this issue Jul 28, 2020 · 1 comment

Comments

@nickjyj
Copy link

nickjyj commented Jul 28, 2020

Hi,

Thanks for your interesting work.
When I tried to run:
python eval.py --instruction use --config configs/voxnet.ini --checkpoint data/checkpoints/use_voxnet_diversenet_release/checkpoint_model_86_val_loss=0.01107167.pth --show_object mug
I got one error message. Please check the image below.

image

I have installed all the virtual environment in the environment.yml. I am running in Windows 8.1 with conda 4.8.3.
Also, attaching all the libraries in the txt file below.
tmp.txt

@samarth-robo
Copy link
Owner

Hi @nickjyj , thanks for your interest in this work!
It seems like masked_targ is a torch.cuda.IntTensor (int32), but should be torch.cuda.LongTensor (int64).

This is coming from L103 of pointcloud_dataset.py, which casts the targ as np.int. As mentioned here, np.int is platform dependent. It is treated as int64 (what we want) in Linux, but int32 (we don't want) on Windows 64-bit (your platform).

So I have pushed commit 51e9d63, which disambiguates the data type. Hopefully that should fix it. Please let me know if it doesn't.

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

2 participants