RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! When predicting with my model
The RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! When predicting with my model error occurs when the input tensors and the model are on different devices (e.g., one on CPU and the other on GPU). To fix the RuntimeError: Expected all tensors to be … Read more