ptrblck:

Call .double() on the model and input, which will transform all parameters to float64:


Thank you for the clarification!
for the input should I call like this:
for x,label in train_loader:
    x = x.double()
    x = x.to(device)
    label = label.to(device) 
    # forward/backward pass as before

or is there a way to specify the double calling directly during the dataset creation (for example using the transform option in torchvision.dataset)