I now get the error RuntimeError: Function DivBackward0 returned an invalid gradient at index 0 - expected type torch.FloatTensor but got torch.cuda.FloatTensor and I get that somewhere in the model there is a tensor that is not on the GPU, but I can’t find it and I’ve been printing out everything in the model trying to find out where it is.
Is there an easy way to figure out where this is being caused?