mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
Fix an error in DDP training.
This commit is contained in:
parent
8055bf31a0
commit
78bb65ed78
@ -214,6 +214,8 @@ def save_checkpoint(
|
|||||||
model:
|
model:
|
||||||
The training model.
|
The training model.
|
||||||
"""
|
"""
|
||||||
|
if rank != 0:
|
||||||
|
return
|
||||||
filename = params.exp_dir / f"epoch-{params.cur_epoch}.pt"
|
filename = params.exp_dir / f"epoch-{params.cur_epoch}.pt"
|
||||||
save_checkpoint_impl(
|
save_checkpoint_impl(
|
||||||
filename=filename,
|
filename=filename,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user