Package org.encog.neural.flat.train.prop

Examples of org.encog.neural.flat.train.prop.TrainFlatNetworkBackPropagation


    FlatNetwork network = new FlatNetwork(input[0].length, HIDDEN_COUNT, 0,
        output[0].length, false);
    network.randomize();
    BasicMLDataSet trainingSet = new BasicMLDataSet(input, output);

    TrainFlatNetworkBackPropagation train = new TrainFlatNetworkBackPropagation(
        network, trainingSet, 0.7, 0.7);

    double[] a = new double[2];
    double[] b = new double[1];

    Stopwatch sw = new Stopwatch();
    sw.start();
    // run epoch of learning procedure
    for (int i = 0; i < ITERATIONS; i++) {
      train.iteration();
    }
    sw.stop();

    return sw.getElapsedMilliseconds();
  }
View Full Code Here


    FlatNetwork network = new FlatNetwork(input[0].length, HIDDEN_COUNT, 0,
        output[0].length, false);
    network.randomize();
    BasicMLDataSet trainingSet = new BasicMLDataSet(input, output);

    TrainFlatNetworkBackPropagation train = new TrainFlatNetworkBackPropagation(
        network, trainingSet, 0.7, 0.7);

    double[] a = new double[2];
    double[] b = new double[1];

    Stopwatch sw = new Stopwatch();
    sw.start();
    // run epoch of learning procedure
    for (int i = 0; i < ITERATIONS; i++) {
      train.iteration();
    }
    sw.stop();

    return sw.getElapsedMilliseconds();
  }
View Full Code Here

  public Backpropagation(final ContainsFlat network,
      final MLDataSet training, final double learnRate,
      final double momentum) {
    super(network, training);
    ValidateNetwork.validateMethodToData(network, training);
    final TrainFlatNetworkBackPropagation backFlat = new TrainFlatNetworkBackPropagation(
        network.getFlat(), getTraining(), learnRate, momentum);
    setFlatTraining(backFlat);

  }
View Full Code Here

   */
  @Override
  public final TrainingContinuation pause() {
    final TrainingContinuation result = new TrainingContinuation();
    result.setTrainingType(this.getClass().getSimpleName());
    final TrainFlatNetworkBackPropagation backFlat = (TrainFlatNetworkBackPropagation) getFlatTraining();
    final double[] d = backFlat.getLastDelta();
    result.set(Backpropagation.LAST_DELTA, d);
    return result;
  }
View Full Code Here

    FlatNetwork network = new FlatNetwork(input[0].length, HIDDEN_COUNT, 0,
        output[0].length, false);
    network.randomize();
    BasicMLDataSet trainingSet = new BasicMLDataSet(input, output);

    TrainFlatNetworkBackPropagation train = new TrainFlatNetworkBackPropagation(
        network, trainingSet, 0.7, 0.7);

    double[] a = new double[2];
    double[] b = new double[1];

    Stopwatch sw = new Stopwatch();
    sw.start();
    // run epoch of learning procedure
    for (int i = 0; i < ITERATIONS; i++) {
      train.iteration();
    }
    sw.stop();

    return sw.getElapsedMilliseconds();
  }
View Full Code Here

TOP

Related Classes of org.encog.neural.flat.train.prop.TrainFlatNetworkBackPropagation

Copyright © 2018 www.massapicom. 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.