text
text copied to clipboard
Save and loading vocabaluray
❓ Questions and Help
Description
I trained a classification model and used torchtext to create vocabulary from a pre-trained model. My problem is that when saving the model, I didn't save the vocabulary TXT object. Now I can't get the model to infer because it can't find the vocabulary. Is there a way to create post training vocabulary or I have to retrain the model. Thanks
Hi @laleye - you should be able to use build_vocab_from_iterator
to rebuild and save the text object given that the way in which you build the vocabulary in the first place was in the same order. There is no need to re-train the model.