Is this, that you are suggesting?
    label=float.type(torch.FloatTensor)
    output=float.type(torch.FloatTensor)

    loss=criterion(label,torch.argmax(output,dim=1))

Now i get this:
File “C:/Users/user/.spyder-py3/original_cnn.py”, line 109, in 
label=float.type(torch.FloatTensor)
AttributeError: type object ‘float’ has no attribute ‘type’