From dcd2626e11f3975e47bc97a4a9156662903873c7 Mon Sep 17 00:00:00 2001 From: "shaohua.zhang" Date: Fri, 24 Jul 2020 17:26:37 +0800 Subject: [PATCH] The if condition is not sufficient when you trian the det model , there is not the var: loss_type in the Global, so train_alg_type == 'rec' is necessary --- tools/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/train.py b/tools/train.py index 0f5e9039..68e792b7 100755 --- a/tools/train.py +++ b/tools/train.py @@ -74,7 +74,7 @@ def main(): # dump mode structure if config['Global']['debug']: - if 'attention' in config['Global']['loss_type']: + if train_alg_type == 'rec' and 'attention' in config['Global']['loss_type']: logger.warning('Does not suport dump attention...') else: summary(train_program) -- GitLab