I am trying to train a DNN model using pytorch, and I want to use GPU to train my model. I am able to successfully copy my model to the GPU using model.to(device)
, where device = cuda:0
.
However, the standard methods for copying input to the GPU, (
Please let me know where I am going wrong. Thank you!
CodePudding user response:
X.to(device)
does nothing.
change it to:
x=x.to(device)
Of course this should be done to any parameter\variable you want on the GPU