From 67742521f191b423f277f004a71c2d2b41545019 Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Fri, 13 May 2022 20:57:53 +0800 Subject: [PATCH] fix evaldataset (#5978) --- ppdet/engine/trainer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ppdet/engine/trainer.py b/ppdet/engine/trainer.py index 29ca286ed..d0070f606 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) -- GitLab