from local

This commit is contained in:
dohe0342 2022-12-13 11:40:25 +09:00
parent 7210ba025b
commit 0c78b6761b
2 changed files with 5 additions and 1 deletions

View File

@ -1311,7 +1311,11 @@ def run(rank, world_size, args, wb=None):
and ("scheduler" in checkpoints or "scheduler_enc" in checkpoints)
and checkpoints["scheduler"] is not None
):
if params.multi_optim and "scheduler_enc" in checkpoints:
if (
params.multi_optim
and "scheduler_enc" in checkpoints
and checkpoin["scheduler_enc"] is not None
):
scheduler_enc.load_state_dict(checkpoints["scheduler_enc"])
scheduler_dec.load_state_dict(checkpoints["scheduler_dec"])
else: