Example usage for org.deeplearning4j.models.embeddings.learning.impl.sequence DM DM

List of usage examples for org.deeplearning4j.models.embeddings.learning.impl.sequence DM DM

Introduction

In this page you can find the example usage for org.deeplearning4j.models.embeddings.learning.impl.sequence DM DM.

Prototype

DM

Source Link

Usage

From source file:org.knime.ext.textprocessing.dl4j.nodes.embeddings.learn.d2v.Doc2VecLearnerNodeModel.java

License:Open Source License

/**
 * Parse the string representation of an
 * {@link org.knime.ext.textprocessing.dl4j.settings.enumerate.SequenceLearningAlgorithm} and returns the
 * corresponding DL4J object.//from   www.ja v a  2 s . c  o  m
 *
 * @param rep
 * @return DL4J object of sequence algo corresponding to specified string representation
 */
private SequenceLearningAlgorithm<VocabWord> parseSequenceAlgo(final String rep) {
    switch (org.knime.ext.textprocessing.dl4j.settings.enumerate.SequenceLearningAlgorithm.valueOf(rep)) {
    case DBOW:
        return new DBOW<VocabWord>();
    case DM:
        return new DM<VocabWord>();
    default:
        throw new IllegalArgumentException("No case defined for SequenceLearningAlgorithm: " + rep);
    }
}