eval with alphanumeric and case sensitive setting fix

This commit is contained in:
Baek JeongHun 2020-02-25 11:13:06 +00:00
parent 1a63bce685
commit dff844874d
1 changed files with 1 additions and 0 deletions

View File

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