Fix bug that would use EMA when set false

This commit is contained in:
Jaret Burkett
2025-08-13 11:39:40 -06:00
parent 259d68d440
commit 85bad57df3

View File

@@ -462,7 +462,7 @@ class TrainConfig:
ema_config: Union[Dict, None] = kwargs.get('ema_config', None)
# if it is set explicitly to false, leave it false.
if ema_config is not None and ema_config.get('use_ema', None) is not None:
if ema_config is not None and ema_config.get('use_ema', False):
ema_config['use_ema'] = True
print(f"Using EMA")
else: