Commit cbd695ac authored by Zhicheng Yan's avatar Zhicheng Yan Committed by Facebook GitHub Bot
Browse files

create CfgNode with consistent type

Summary: Create new CfgNode that is consistent with the parent node.

Reviewed By: zhanghang1989

Differential Revision: D28318466

fbshipit-source-id: 38cb84de6bdfec2b283c4d9a1090cad47c118c9c
parent da49fa9a
...@@ -127,9 +127,7 @@ class EMAUpdater(object): ...@@ -127,9 +127,7 @@ class EMAUpdater(object):
def add_model_ema_configs(_C): def add_model_ema_configs(_C):
from d2go.config import CfgNode as CN _C.MODEL_EMA = type(_C)()
_C.MODEL_EMA = CN()
_C.MODEL_EMA.ENABLED = False _C.MODEL_EMA.ENABLED = False
_C.MODEL_EMA.DECAY = 0.999 _C.MODEL_EMA.DECAY = 0.999
# use the same as MODEL.DEVICE when empty # use the same as MODEL.DEVICE when empty
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment