Merge pull request #1 from youngjei/youngjei-patch-1

Update test.py
This commit is contained in:
youngjei 2020-12-03 16:05:30 +08:00 committed by GitHub
commit 622ea1240b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ def validation(model, criterion, evaluation_loader, converter, opt):
preds = model(image, text_for_pred) preds = model(image, text_for_pred)
forward_time = time.time() - start_time forward_time = time.time() - start_time
# Calculate evaluation loss for CTC deocder. # Calculate evaluation loss for CTC decoder.
preds_size = torch.IntTensor([preds.size(1)] * batch_size) preds_size = torch.IntTensor([preds.size(1)] * batch_size)
# permute 'preds' to use CTCloss format # permute 'preds' to use CTCloss format
if opt.baiduCTC: if opt.baiduCTC: