Update README.md

I assume that it should test the `re-load` functionality after testing the `save` functionality, however I'm also surprised that nobody points this out after such a long time, so maybe I've misunderstood the purpose. This PR is just in case :)
This commit is contained in:
carefree0910 2019-08-11 21:36:51 +08:00 committed by Lysandre Debut
parent aaedfc35a8
commit a7b4cfe919

View File

@ -123,7 +123,7 @@ traced_model = torch.jit.trace(model, (input_ids,))
model.save_pretrained('./directory/to/save/') # save
model = model_class.from_pretrained('./directory/to/save/') # re-load
tokenizer.save_pretrained('./directory/to/save/') # save
tokenizer = tokenizer_class.from_pretrained(pretrained_weights)
tokenizer = tokenizer_class.from_pretrained('./directory/to/save/') # re-load
# SOTA examples for GLUE, SQUAD, text generation...
```