Examples of freezeWeights()


Examples of cc.mallet.fst.CRF.freezeWeights()

    CRF crf2 = new CRF(p.getDataAlphabet(), p.getTargetAlphabet());
    crf2.addFullyConnectedStatesForLabels();
    // Freeze some weights, before training
    for (int i = 0; i < crf2.getWeights().length; i += 2)
      crf2.freezeWeights(i);
    CRFTrainerByLabelLikelihood crft2 = new CRFTrainerByLabelLikelihood(
        crf2);
    crft2.trainIncremental(instances);

    SparseVector[] w = crf2.getWeights();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.