Closed ekomurcu closed 3 years ago
I have a similar issue with calling .sparse()
with RuntimeError: ... assertion (at::cuda::check_device({rows, cols, mat2})) failed. All inputs must be on the same device.
This is occurring in MinkowskiTensorField.py
at this line. Thanks.
Hello, the error still occurs when a min_coordinate
is passed as a parameter.
It must be of type "torch.IntTensor" due to the first assert.
Adding min_coordinate = min_coordinate.to(self.device)
line 512 after the else:
fix the problem for the 'dense' function.
Hi,
When I called dense() function to convert sparse tensor back to dense tensor, I got this error:
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
I think the problem comes from the local variable of
tensor_stride
which should be initialised at the device that is being used. After changing these two lines, I could train my network. Hope this helps.Best