You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first of all, thank you for releasing your code.
I just found a small bug in errorify/error.py - in the function readn at line 53, the extra "yield clist" outside the for loop will yield a duplicate batch if the number of lines in the file is divisible by the batch size.
(so for a source file of 1,000 lines with batch size 200, corr_sentences.txt and incorr_sentences.txt would have 1,200 lines).
A simple fix is removing the boolean "start" checks and setting "clist = []" after every "yield clist" in the for loop, so if the number of lines in the file is divisible by the batch size, the yield outside of the loop will just return an empty list.
The text was updated successfully, but these errors were encountered:
Hi, first of all, thank you for releasing your code.
I just found a small bug in errorify/error.py - in the function readn at line 53, the extra "yield clist" outside the for loop will yield a duplicate batch if the number of lines in the file is divisible by the batch size.
(so for a source file of 1,000 lines with batch size 200, corr_sentences.txt and incorr_sentences.txt would have 1,200 lines).
A simple fix is removing the boolean "start" checks and setting "clist = []" after every "yield clist" in the for loop, so if the number of lines in the file is divisible by the batch size, the yield outside of the loop will just return an empty list.
The text was updated successfully, but these errors were encountered: