Fix an error in TDNN-LSTM training.

This commit is contained in:
Fangjun Kuang 2021-07-31 15:55:42 +08:00
parent 398ed80d7a
commit c9222bdb09

View File

@ -501,8 +501,9 @@ def run(rank, world_size, args):
)
scheduler = StepLR(optimizer, step_size=8, gamma=0.1)
optimizer.load_state_dict(checkpoints["optimizer"])
scheduler.load_state_dict(checkpoints["scheduler"])
if checkpoints:
optimizer.load_state_dict(checkpoints["optimizer"])
scheduler.load_state_dict(checkpoints["scheduler"])
librispeech = LibriSpeechAsrDataModule(args)
train_dl = librispeech.train_dataloaders()