mirror of
https://github.com/wassname/TTS.git
synced 2026-10-28 12:41:20 +08:00
Fix loading the amp scaler from a checkpoint 🛠️
This commit is contained in:
1 parent
a7617d8ab6
commit
fbba37e01e
1 file changed
+1
-1
+1
-1
@@ -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