From 70c6865bc38e81315f1b9bc2be16a0d5676b5fdf Mon Sep 17 00:00:00 2001 From: liujing04 <129054828+liujing04@users.noreply.github.com> Date: Sun, 9 Apr 2023 15:23:27 +0000 Subject: [PATCH] Update train_nsf_sim_cache_sid_load_pretrain.py --- train_nsf_sim_cache_sid_load_pretrain.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/train_nsf_sim_cache_sid_load_pretrain.py b/train_nsf_sim_cache_sid_load_pretrain.py index 3fb341b..065b9b7 100644 --- a/train_nsf_sim_cache_sid_load_pretrain.py +++ b/train_nsf_sim_cache_sid_load_pretrain.py @@ -7,7 +7,7 @@ os.environ["CUDA_VISIBLE_DEVICES"]=hps.gpus.replace("-",",") n_gpus=len(hps.gpus.split("-")) from random import shuffle import traceback,json,argparse,itertools,math,torch,pdb -torch.backends.cudnn.deterministic = True +torch.backends.cudnn.deterministic = False torch.backends.cudnn.benchmark = False from torch import nn, optim from torch.nn import functional as F @@ -311,7 +311,7 @@ def train_and_evaluate( ) global_step += 1 # if global_step % hps.train.eval_interval == 0: - if epoch % hps.save_every_epoch == 0: + if epoch % hps.save_every_epoch == 0 and rank == 0: if(hps.if_latest==0): utils.save_checkpoint( net_g, @@ -466,7 +466,7 @@ def train_and_evaluate( ) global_step += 1 # if global_step % hps.train.eval_interval == 0: - if epoch % hps.save_every_epoch == 0: + if epoch % hps.save_every_epoch == 0 and rank == 0: if(hps.if_latest==0): utils.save_checkpoint( net_g,