diff --git a/ppdet/engine/trainer.py b/ppdet/engine/trainer.py index 29ca286ed0698026176f888ba2e6d2c8182207cf..d0070f6064e902fb75eae514cbea934df2b64709 100644 --- a/ppdet/engine/trainer.py +++ b/ppdet/engine/trainer.py @@ -376,7 +376,8 @@ class Trainer(object): assert self.mode == 'train', "Model not in 'train' mode" Init_mark = False 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 self.cfg.use_gpu and self._nranks > 1)