mirror of
https://github.com/coqui-ai/TTS.git
synced 2026-07-11 21:09:23 +02:00
Fix loading the amp scaler from a checkpoint 🛠️
This commit is contained in:
@@ -306,7 +306,7 @@ class Trainer:
|
||||
model.load_state_dict(checkpoint["model"])
|
||||
print(" > Restoring Optimizer...")
|
||||
optimizer = _restore_list_objs(checkpoint["optimizer"], optimizer)
|
||||
if "scaler" in checkpoint and self.use_amp_scaler:
|
||||
if "scaler" in checkpoint and self.use_amp_scaler and checkpoint["scaler"]:
|
||||
print(" > Restoring AMP Scaler...")
|
||||
scaler = _restore_list_objs(checkpoint["scaler"], scaler)
|
||||
except (KeyError, RuntimeError):
|
||||
|
||||
Reference in New Issue
Block a user