add a constraint

pull/5019/head
shaohua.zhang 2021-12-22 17:51:40 +08:00 committed by GitHub
parent 73f3dbd508
commit e45b4c515c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)