Could you check the type() of your images tensor?
I assume, if might by a ByteTensor, while a FloatTensor is expected to match the tensor type of the model’s parameters.
In that case, you could call images = images.float() to get the expected type.
Also, if that’s the case, I assume you have not normalized your input data, which could help during training.