From ee95ba0053090d673259bf8db34dbcd10bbab431 Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Thu, 15 Oct 2020 12:31:32 +0800 Subject: [PATCH] fix error in train_batch_size sync from load_config (#1568) --- ppdet/core/workspace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppdet/core/workspace.py b/ppdet/core/workspace.py index 03c53df58..d7074a1f4 100644 --- a/ppdet/core/workspace.py +++ b/ppdet/core/workspace.py @@ -139,7 +139,7 @@ def merge_config(config, another_cfg=None): # batch size config to global, models can get batch size config # from global config when building model. # batch size in evaluation or inference can also be added here - if 'TrainReader' in dct: + if 'TrainReader' in dct and 'batch_size' in dct['TrainReader']: dct['train_batch_size'] = dct['TrainReader']['batch_size'] return dct -- GitLab