Yes, I have called model.cuda() through below line:

model = nn.DataParallel(model).cuda()

The second error is expecting torch.FloatTensor but torch.cuda.FloatTensor is found.
Don’t know why is it expecting torch.FloatTensor.