Skip to content

Commit

Permalink
fix tester bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Z-yq committed Jan 6, 2021
1 parent bef180c commit 0237047
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tester/am_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _eval_step(self, batch):
i=i[:index]
index=j.index(self.text_featurizer.stop)
j=j[:index]
score, ws, wd, wi = wer(i, j)
score, ws, wd, wi = wer(j, i)
self.cer_s+=ws
self.cer_d+=wd
self.cer_i+=wi
Expand Down
2 changes: 1 addition & 1 deletion tester/lm_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _eval_step(self, batch):
index = j.index(self.model.end_id)
j = j[1:index]

score, ws, wd, wi = wer(i, j)
score, ws, wd, wi = wer(j, i)
self.cer_s+=ws
self.cer_d+=wd
self.cer_i+=wi
Expand Down

0 comments on commit 0237047

Please sign in to comment.