简体   繁体   中英

FileNotFoundError: [Errno 2] No such file or directory: 'fasttext.model.wv.vectors_ngrams.npy' can't load fasttext model

fasttext_model.save("fasttext.model")
fast_text = FastText.load("fasttext.model")

click this to see the error

I can't load my trained fasttext model:( How will i resolve this issue? please help!

Your screenshot does not show the .save() line of code, and in fact includes some output that is suggestive that another filename – fasttext (1).model – may have been used.

Is your code example a verbatim expression of exactly what was done, all in the same interpreter/working-directory/notebook, to reliably reproduce the error?

You can generally trust a FileNotFoundError that the intended file does not exist where your code has requested it.

In this case, the filename is one of the subsidiary files, which is saved alongside the main model file. If you move the main file, these subsidiary files must be moved also, to remain alongside the main file in the same directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM