1
0
mirror of synced 2024-11-15 03:07:40 +01:00

fix: extract freture cannot run on pure cpu

This commit is contained in:
源文雨 2023-04-01 17:01:51 +08:00
parent 3489b4f6da
commit 9e59375311

View File

@ -1,9 +1,14 @@
import os,sys,traceback
n_part=int(sys.argv[1])
i_part=int(sys.argv[2])
i_gpu=sys.argv[3]
exp_dir=sys.argv[4]
os.environ["CUDA_VISIBLE_DEVICES"]=str(i_gpu)
if len(sys.argv) == 4:
n_part=int(sys.argv[1])
i_part=int(sys.argv[2])
exp_dir=sys.argv[3]
else:
n_part=int(sys.argv[1])
i_part=int(sys.argv[2])
i_gpu=sys.argv[3]
exp_dir=sys.argv[4]
os.environ["CUDA_VISIBLE_DEVICES"]=str(i_gpu)
import torch
import torch.nn.functional as F