use of org.deeplearning4j.models.embeddings.wordvectors.WordVectorsImpl in project deeplearning4j by deeplearning4j.
the class WordVectorSerializer method fromTableAndVocab.
/**
* Load word vectors for the given vocab and table
*
* @param table
* the weights to use
* @param vocab
* the vocab to use
* @return wordvectors based on the given parameters
*/
public static WordVectors fromTableAndVocab(WeightLookupTable table, VocabCache vocab) {
WordVectorsImpl vectors = new WordVectorsImpl();
vectors.setLookupTable(table);
vectors.setVocab(vocab);
vectors.setModelUtils(new BasicModelUtils());
return vectors;
}
Aggregations