mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-26 13:00:58 +08:00
Correct behavior for argument gpus in Trainer (#561)
This commit is contained in:
1 parent
db0587f158
commit
df7b6d958e
1 file changed
+1
-1
@@ -132,7 +132,7 @@ class Trainer(TrainerIOMixin,
|
||||
self.gradient_clip_val = gradient_clip_val
|
||||
self.check_val_every_n_epoch = check_val_every_n_epoch
|
||||
self.track_grad_norm = track_grad_norm
|
||||
self.on_gpu = gpus is not None and torch.cuda.is_available()
|
||||
self.on_gpu = True if (gpus and torch.cuda.is_available()) else False
|
||||
self.process_position = process_position
|
||||
self.weights_summary = weights_summary
|
||||
self.max_nb_epochs = max_nb_epochs
|
||||
|
||||
Reference in new issue
Block a user