You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug trainer.on_gpu == True for gpus = 0 or gpus=[] because of this line.
When resuming from a checkpoint, the model is transfered to gpu at this line, even if gpus=0
Expected behavior gpus=0 should make training happen on CPU.
I can make a PR for that, the fix is pretty simple, I think we can just replace self.on_gpu = gpus is not None and torch.cuda.is_available()
by self.on_gpu = True if (gpus and torch.cuda.is_available()) else False
Am I missing something?
The text was updated successfully, but these errors were encountered:
Describe the bug
trainer.on_gpu == True
forgpus = 0
orgpus=[]
because of this line.When resuming from a checkpoint, the model is transfered to gpu at this line, even if
gpus=0
Expected behavior
gpus=0
should make training happen on CPU.I can make a PR for that, the fix is pretty simple, I think we can just replace
self.on_gpu = gpus is not None and torch.cuda.is_available()
by
self.on_gpu = True if (gpus and torch.cuda.is_available()) else False
Am I missing something?
The text was updated successfully, but these errors were encountered: