the input to your network is on the CPU, but your network is transferred to the GPU (or vice versa).
Here’s the critical part of the error that helped me figure this out:
 got (int, int, torch.FloatTensor, torch.cuda.FloatTensor),