Evaluation fixed.

This commit is contained in:
altsoph authored and Lysandre Debut committed 2019-10-28 10:18:58 -04:00
1 parent 438f2730a0
commit 079bfb32fb
1 file changed
+1 -2
+1 -2
View File
@@ -86,7 +86,6 @@ class TextDataset(Dataset):
# Note that we are loosing the last truncated example here for the sake of simplicity (no padding)
# If your dataset is small, first you should loook for a bigger one :-) and second you
# can change this behavior by adding (model specific) padding.
self.examples.append(tokenizer.build_inputs_with_special_tokens(tokenized_text[-block_size:])) # DIRTY!
logger.info("Saving features into cached file %s", cached_features_file)
with open(cached_features_file, 'wb') as handle:
@@ -543,4 +542,4 @@ def main():
if __name__ == "__main__":
main()
main()