Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same

Hello!! I am having this error, somebody could help me??

Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same

Here is the code :https://gist.github.com/evarenieto/be162094adf2f699794bac2a6fd2e8a8

I guess you need to send the model also to the device using model.to(device). I see that you have done that in case of accuracy but not for train.

Hello Kelam_goutam,

I just did it and the errors comes again :frowning:

And i have to say that it is my first porject, so i am beginner