RuntimeError: you must first build vocabulary before training the model


解決RuntimeError: you must first build vocabulary before training the model錯誤

查找解決方案,意思就是說你的數據集中的數量過少,解決方案有兩種,擴大數據集的數量、另一個就是更改min_count的值例如:如果太少的話可以更改為

model=word2vec.Word2Vec(sentences, vector_size=100,min_count=1)
把這個更改了之后重新運行即可


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM