contactdb_prediction icon indicating copy to clipboard operation
contactdb_prediction copied to clipboard

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

Open nickjyj opened this issue 4 years ago • 1 comments

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

nickjyj avatar Jul 28 '20 21:07 nickjyj

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 51e9d6349f6b2daef580272e17a73278ab86c6dc, which disambiguates the data type. Hopefully that should fix it. Please let me know if it doesn't.

samarth-robo avatar Jul 29 '20 19:07 samarth-robo