Skip to content

Commit 756f490

Browse files
authored
[egs] Add training with multiple machines (#3966)
1 parent b63efc3 commit 756f490

File tree

12 files changed

+331
-684
lines changed

12 files changed

+331
-684
lines changed

egs/aishell/s10/chain/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def load_checkpoint(filename, model):
6565

6666

6767
def save_checkpoint(filename, model, epoch, learning_rate, objf, local_rank=0):
68-
if local_rank != 0:
68+
if local_rank != None and local_rank != 0:
6969
return
7070

7171
logging.info('Save checkpoint to {filename}: epoch={epoch}, '
@@ -91,7 +91,7 @@ def save_training_info(filename,
9191
best_objf,
9292
best_epoch,
9393
local_rank=0):
94-
if local_rank != 0:
94+
if local_rank != None and local_rank != 0:
9595
return
9696

9797
with open(filename, 'w') as f:

0 commit comments

Comments
 (0)