add 'global' keyword to args, best_rank1
parent
e9b578a720
commit
0374e33c7c
|
@ -109,6 +109,8 @@ best_rank1 = -np.inf
|
|||
|
||||
|
||||
def main():
|
||||
global args, best_rank1
|
||||
|
||||
torch.manual_seed(args.seed)
|
||||
if not args.use_avai_gpus: os.environ['CUDA_VISIBLE_DEVICES'] = args.gpu_devices
|
||||
use_gpu = torch.cuda.is_available()
|
||||
|
|
|
@ -114,6 +114,8 @@ best_rank1 = -np.inf
|
|||
|
||||
|
||||
def main():
|
||||
global args, best_rank1
|
||||
|
||||
torch.manual_seed(args.seed)
|
||||
if not args.use_avai_gpus: os.environ['CUDA_VISIBLE_DEVICES'] = args.gpu_devices
|
||||
use_gpu = torch.cuda.is_available()
|
||||
|
|
|
@ -103,6 +103,8 @@ best_rank1 = -np.inf
|
|||
|
||||
|
||||
def main():
|
||||
global args, best_rank1
|
||||
|
||||
torch.manual_seed(args.seed)
|
||||
if not args.use_avai_gpus: os.environ['CUDA_VISIBLE_DEVICES'] = args.gpu_devices
|
||||
use_gpu = torch.cuda.is_available()
|
||||
|
|
|
@ -108,6 +108,8 @@ best_rank1 = -np.inf
|
|||
|
||||
|
||||
def main():
|
||||
global args, best_rank1
|
||||
|
||||
torch.manual_seed(args.seed)
|
||||
if not args.use_avai_gpus: os.environ['CUDA_VISIBLE_DEVICES'] = args.gpu_devices
|
||||
use_gpu = torch.cuda.is_available()
|
||||
|
|
Loading…
Reference in New Issue