I started using pytorch recently, I’m forced to use version 0.3.0, I created a network that works on CPU, now I would like to try on GPU, I read in the documentation that I should use " model.to (device) ", device for example cuda: 0, but this gave me an error " MyModel: object has no attribute to ", so I tried like this:
Thank you so much, a simple error that was making me crazy.
Now the network starts on a TITAN PASCAL GPU, suggestions on the num_workers to be set in the Dataloader?
Thank you.
Good to hear! num_workers depends on your CPU and probably your i/o throughput. Start with the number of cores and try different values around it. The Imagenet example uses code to time the data loading time which might be useful for you.