This is the error:
RuntimeError: Expected object of type torch.cuda.FloatTensor but found type torch.cuda.DoubleTensor for argument #2 ‘target’
and the criterion is:
criterion = nn.MSELoss(size_average=True).cuda()
and those are my output shapes and values:
output tensor([[ 0.4398],
[ 0.4516],
[ 0.4457],
[ 0.4424],
[ 0.4521],
[ 0.4275],
[ 0.4483],
[ 0.4403],
[ 0.4385],
[ 0.4634],
[ 0.4566],
[ 0.4427],
[ 0.4404],
[ 0.4565],
[ 0.4455],
[ 0.4476]], device=‘cuda:0’)
target tensor(1.00000e-02 *
[[ 1.7727],
[ 4.0564],
[ 4.9746],
[ 4.9140],
[ 5.3685],
[ 5.9247],
[ 5.2389],
[ 5.3715],
[ 5.4332],
[ 5.2338],
[ 5.4343],
[ 3.9557],
[ 4.1932],
[ 4.2754],
[ 3.8148],
[ 3.9546]], dtype=torch.float64, device=‘cuda:0’)