Просмотр исходного кода

Added warning if cuda is disabled, to avoid silent failure

Maxime Chevalier-Boisvert 7 лет назад
Родитель
Сommit
d4d83a9bf6
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      pytorch-rl/arguments.py

+ 3 - 0
pytorch-rl/arguments.py

@@ -64,4 +64,7 @@ def get_args():
     args.cuda = not args.no_cuda and torch.cuda.is_available()
     args.vis = not args.no_vis
 
+    if not args.cuda:
+        print('*** WARNING: CUDA NOT ENABLED ***')
+
     return args