0

我尝试将 Word2Vec 格式的 dutchembeddings 与 dl4j 一起使用。但是调用loadStaticModel时抛出异常:“无法猜测输入文件格式”

WordVectorSerializer.loadStaticModel(new File(WORD_VECTORS_PATH)

https://github.com/clips/dutchembeddings(我下载了维基百科 160 tar.gz)

如何让 Word2Vec 格式的 dutchembeddings 与 dl4j 一起使用?

堆栈跟踪

Loading word vectors and creating DataSetIterators
o.d.m.e.l.WordVectorSerializer - Trying DL4j format...
o.d.m.e.l.WordVectorSerializer - Trying CSVReader...
o.d.m.e.l.WordVectorSerializer - Trying BinaryReader...
Exception in thread "main" java.lang.RuntimeException: Unable to guess input file format
    at org.deeplearning4j.models.embeddings.loader.WordVectorSerializer.loadStaticModel(WordVectorSerializer.java:2646)
    at org.deeplearning4j.examples.convolution.sentenceclassification.CnnDutchSentenceClassification.main(CnnDutchSentenceClassification.java:122)

Process finished with exit code 1
4

0 回答 0