eval with alphanumeric and case sensitive setting fix
This commit is contained in:
parent
1a63bce685
commit
dff844874d
1
test.py
1
test.py
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue