Evaluation fixed.

This commit is contained in:
altsoph 2019-10-25 13:26:37 +03:00 committed by Lysandre Debut
parent 438f2730a0
commit 079bfb32fb

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()