Fix bug that would use EMA when set false
This commit is contained in:
@@ -462,7 +462,7 @@ class TrainConfig:
|
|||||||
|
|
||||||
ema_config: Union[Dict, None] = kwargs.get('ema_config', None)
|
ema_config: Union[Dict, None] = kwargs.get('ema_config', None)
|
||||||
# if it is set explicitly to false, leave it false.
|
# 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
|
ema_config['use_ema'] = True
|
||||||
print(f"Using EMA")
|
print(f"Using EMA")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user