Class StaticWord2Vec.Builder
- java.lang.Object
-
- org.deeplearning4j.models.word2vec.StaticWord2Vec.Builder
-
- Enclosing class:
- StaticWord2Vec
public static class StaticWord2Vec.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder(org.nd4j.linalg.compression.AbstractStorage<Integer> storage, VocabCache<VocabWord> vocabCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StaticWord2Vecbuild()This method returns Static Word2Vec implementation, which is suitable for tasks like neural nets feeding.StaticWord2Vec.BuildersetCachePerDevice(long bytes)This method lets you to define if decompressed values will be cached, to avoid excessive decompressions.
-
-
-
Constructor Detail
-
Builder
public Builder(org.nd4j.linalg.compression.AbstractStorage<Integer> storage, VocabCache<VocabWord> vocabCache)
- Parameters:
storage- AbstractStorage implementation, key has to be Integer, index of vocabWordsvocabCache- VocabCache implementation, which will be used to lookup word indexes
-
-
Method Detail
-
setCachePerDevice
public StaticWord2Vec.Builder setCachePerDevice(long bytes)
This method lets you to define if decompressed values will be cached, to avoid excessive decompressions. If bytes == 0 - no cache will be used.- Parameters:
bytes-- Returns:
-
build
public StaticWord2Vec build()
This method returns Static Word2Vec implementation, which is suitable for tasks like neural nets feeding.- Returns:
-
-