Skip to content

Commit 70c6865

Browse files
authored
Update train_nsf_sim_cache_sid_load_pretrain.py
1 parent 47c6653 commit 70c6865

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

train_nsf_sim_cache_sid_load_pretrain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
n_gpus=len(hps.gpus.split("-"))
88
from random import shuffle
99
import traceback,json,argparse,itertools,math,torch,pdb
10-
torch.backends.cudnn.deterministic = True
10+
torch.backends.cudnn.deterministic = False
1111
torch.backends.cudnn.benchmark = False
1212
from torch import nn, optim
1313
from torch.nn import functional as F
@@ -311,7 +311,7 @@ def train_and_evaluate(
311311
)
312312
global_step += 1
313313
# if global_step % hps.train.eval_interval == 0:
314-
if epoch % hps.save_every_epoch == 0:
314+
if epoch % hps.save_every_epoch == 0 and rank == 0:
315315
if(hps.if_latest==0):
316316
utils.save_checkpoint(
317317
net_g,
@@ -466,7 +466,7 @@ def train_and_evaluate(
466466
)
467467
global_step += 1
468468
# if global_step % hps.train.eval_interval == 0:
469-
if epoch % hps.save_every_epoch == 0:
469+
if epoch % hps.save_every_epoch == 0 and rank == 0:
470470
if(hps.if_latest==0):
471471
utils.save_checkpoint(
472472
net_g,

0 commit comments

Comments
 (0)