Commit 411018fc authored by ngimel's avatar ngimel Committed by Myle Ott
Browse files

add count for padding words (#180)

parent 8cba7b14
Loading
Loading
Loading
Loading
+1 −0
Changes for fairseq/data/dictionary.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ class Dictionary(object):
            i = 0
            while threshold_nwords % padding_factor != 0:
                new_symbols.append('madeupword{:04d}'.format(i))
                new_count.append(0)
                i += 1
                threshold_nwords += 1