未验证 提交 67742521 编写于 作者: W wangguanzhong 提交者: GitHub

fix evaldataset (#5978)

上级 1480c8ee
...@@ -376,7 +376,8 @@ class Trainer(object): ...@@ -376,7 +376,8 @@ class Trainer(object):
assert self.mode == 'train', "Model not in 'train' mode" assert self.mode == 'train', "Model not in 'train' mode"
Init_mark = False Init_mark = False
if validate: if validate:
self.cfg.EvalDataset = create("EvalDataset")() self.cfg['EvalDataset'] = self.cfg.EvalDataset = create(
"EvalDataset")()
sync_bn = (getattr(self.cfg, 'norm_type', None) == 'sync_bn' and sync_bn = (getattr(self.cfg, 'norm_type', None) == 'sync_bn' and
self.cfg.use_gpu and self._nranks > 1) self.cfg.use_gpu and self._nranks > 1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册