mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-25 12:50:57 +08:00
updated args
This commit is contained in:
1 parent
e12c8ad21a
commit
338f889e7c
1 file changed
+1
-3
@@ -43,9 +43,7 @@ def main(hparams, cluster, results_dict):
|
||||
:param hparams:
|
||||
:return:
|
||||
"""
|
||||
on_gpu = torch.cuda.is_available()
|
||||
if hparams.disable_cuda:
|
||||
on_gpu = False
|
||||
on_gpu = hparams.gpus is not None and torch.cuda.is_available()
|
||||
|
||||
device = 'cuda' if on_gpu else 'cpu'
|
||||
hparams.__setattr__('device', device)
|
||||
|
||||
Reference in new issue
Block a user