mirror of https://github.com/coqui-ai/TTS.git
Add the ValueError in the restore checkpoint exception to avoid problems with the optimizer restauration when new keys are addition
parent
ecf327a118
commit
fee01daa09
|
@ -453,7 +453,7 @@ class Trainer:
|
|||
if "scaler" in checkpoint and self.use_amp_scaler and checkpoint["scaler"]:
|
||||
print(" > Restoring Scaler...")
|
||||
scaler = _restore_list_objs(checkpoint["scaler"], scaler)
|
||||
except (KeyError, RuntimeError):
|
||||
except (KeyError, RuntimeError, ValueError):
|
||||
print(" > Partial model initialization...")
|
||||
model_dict = model.state_dict()
|
||||
model_dict = set_init_dict(model_dict, checkpoint["model"], config)
|
||||
|
|
Loading…
Reference in New Issue