I am training a GAN model, i want to train it 200 epochs, but when it comes to the second epoch, an error comes:
RuntimeError: Input type (CUDAFloatTensor) and weight type (CPUFloatTensor) should be the same
I have put the data and model into gpu yet, and the first epoch training is fine, where did this error come?
Could you please provide more context behind what your model looks like? You’re right that it’s strange that after one good epoch of training the model crashes with that assertion.
it seems like after first epoch of training the parameters of model changes from torch.cuda.FloatTensor to torch.FloatTensor, I do not know if it is from my definition of model or somewhere else, and it makes me crazy…