Merge pull request #5019 from BeyondYourself/release/2.4

add a constraint
pull/5037/head
Double_V 2021-12-22 17:57:04 +08:00 committed by GitHub
commit 93328b6457
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)