pytorch_scatter
pytorch_scatter copied to clipboard
RuntimeError
RuntimeError: Expected object of scalar type Long but got scalar type Float for argument #3 'index' in call to th_scatter_add The above operation failed in interpreter. Traceback (most recent call last): File "//anaconda3/envs/geometric/lib/python3.8/site-packages/torch_scatter/scatter.py", line 22 size[dim] = int(index.max()) + 1 out = torch.zeros(size, dtype=src.dtype, device=src.device) return out.scatter_add_(dim, index, src) ~~~~~~~~~~~~~~~~ <--- HERE else: return out.scatter_add_(dim, index, src)
Can you help me to solve this problem?
Can you confirm that your index
tensor is of type torch.long
via index = index.long()
?
This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?