Update rec_metric.py

This commit is contained in:
topduke 2021-08-19 17:34:38 +08:00 committed by GitHub
parent 55b76dcaa5
commit c635925895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -48,8 +48,8 @@ class RecMetric(object):
'norm_edit_dis': 0,
}
"""
acc = 1.0 * self.correct_num / (self.all_num)
norm_edit_dis = 1 - self.norm_edit_dis / (self.all_num)
acc = 1.0 * self.correct_num / self.all_num
norm_edit_dis = 1 - self.norm_edit_dis / self.all_num
self.reset()
return {'acc': acc, 'norm_edit_dis': norm_edit_dis}