update scripts

This commit is contained in:
Xuanyi Dong
2019-04-01 00:19:43 +08:00
parent 322d5462a3
commit d9a282a455
4 changed files with 24 additions and 3 deletions

View File

@@ -36,6 +36,9 @@ parser.add_argument('--print_freq', type=int, help='print frequency (default:
parser.add_argument('--manualSeed', type=int, help='manual seed')
args = parser.parse_args()
if 'CUDA_VISIBLE_DEVICES' not in os.environ: print('Can not find CUDA_VISIBLE_DEVICES in os.environ')
else : print('Find CUDA_VISIBLE_DEVICES={:}'.format(os.environ['CUDA_VISIBLE_DEVICES']))
assert torch.cuda.is_available(), 'torch.cuda is not available'