未验证 提交 f3f8dc9c 编写于 作者: W wangxinxin08 提交者: GitHub

fix ema resume (#5413)

上级 1d8dc38f
......@@ -339,7 +339,8 @@ class ModelEMA(object):
def resume(self, state_dict, step=0):
for k, v in state_dict.items():
self.state_dict[k] = v
if k in self.state_dict:
self.state_dict[k] = v
self.step = step
def update(self, model=None):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册