Examples of CrossEntropyErrorFunction


Examples of de.jungblut.math.squashing.CrossEntropyErrorFunction

  public void testXORSoftMaxFminCG() {
    MultilayerPerceptron mlp = MultilayerPerceptron.MultilayerPerceptronBuilder
        .create(
            new int[] { 2, 4, 2 },
            new ActivationFunction[] { LINEAR.get(), SIGMOID.get(),
                SOFTMAX.get() }, new CrossEntropyErrorFunction(), new Fmincg(),
            100).build();
    Tuple<DoubleVector[], DoubleVector[]> sampleXOR = sampleXORSoftMax();
    double error = mlp.train(sampleXOR.getFirst(), sampleXOR.getSecond(),
        new Fmincg(), 100, 0.0d, false);
    System.out.println(error);
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.