Tushar_Goel:

Does anyone know why this happens?


Since you’ve fixed the issue by transforming a tensor or model to float(), check its creation and narrow down why it was created as a DoubleTensor in the first place. Often this issue is caused by transforming numpy arrays to tensors, as the former uses float64 by default.