otaheri / chamfer_distance

Implementation of the Chamfer Distance as a module for PyTorch
MIT License
166 stars 20 forks source link

cuda changed to specific device #5

Closed purvaten closed 2 years ago

purvaten commented 2 years ago

I was running into issues while using this function for code that was running on a device other than 'cuda:0'.

For example: RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:6 and cuda:0!.

This simple fix resolves the issue. Cheers!

otaheri commented 2 years ago

Thank you @purvaten for the simple solution.