From e45b4c515cd3fe23e21cea56522baf44fd2a274e Mon Sep 17 00:00:00 2001 From: "shaohua.zhang" Date: Wed, 22 Dec 2021 17:51:40 +0800 Subject: [PATCH] add a constraint --- tools/program.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/program.py b/tools/program.py index 333e8ed9..1dfd06af 100755 --- a/tools/program.py +++ b/tools/program.py @@ -266,7 +266,7 @@ def train(config, stats['lr'] = lr train_stats.update(stats) - if cal_metric_during_train: # only rec and cls need + if cal_metric_during_train and model_type is not "det": # only rec and cls need batch = [item.numpy() for item in batch] if model_type in ['table', 'kie']: eval_class(preds, batch) -- GitLab