Skip to content

Commit

Permalink
eval with alphanumeric and case sensitive setting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Baek JeongHun committed Feb 25, 2020
1 parent 1a63bce commit dff8448
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def validation(model, criterion, evaluation_loader, converter, opt):
alphanumeric_case_insensitve = '0123456789abcdefghijklmnopqrstuvwxyz'
out_of_alphanumeric_case_insensitve = f'[^{alphanumeric_case_insensitve}]'
pred = re.sub(out_of_alphanumeric_case_insensitve, '', pred)
gt = re.sub(out_of_alphanumeric_case_insensitve, '', gt)

if pred == gt:
n_correct += 1
Expand Down

0 comments on commit dff8448

Please sign in to comment.