medallia / Word2VecJava

Word2Vec Java Port
MIT License
185 stars 81 forks source link

change CBOW's dimensionality #45

Open windblow32 opened 2 years ago

windblow32 commented 2 years ago

I'm working on using this word2vec (I set trainer.type(NeuralNetworkType.CBOW)) to do some representing learning staff, and I wonder how to change the vector dimensionality I use getRawVector() method in Searcher.class, it seems that the vector returned is all one dimensionality.

guerda commented 2 years ago

setLayerSize should be helpful for you. https://github.com/medallia/Word2VecJava/blob/master/src/main/java/com/medallia/word2vec/Word2VecTrainerBuilder.java#L88