Package org.encog.neural.networks.layers

Examples of org.encog.neural.networks.layers.BasicLayer


  public static final int OUTPUT_COUNT = 20;
 
  public static BasicNetwork generateNetwork()
  {
    final BasicNetwork network = new BasicNetwork();
    network.addLayer(new BasicLayer(MultiBench.INPUT_COUNT));
    network.addLayer(new BasicLayer(MultiBench.HIDDEN_COUNT));
    network.addLayer(new BasicLayer(MultiBench.OUTPUT_COUNT));
    network.getStructure().finalizeStructure();
    network.reset();
    return network;
  }
View Full Code Here


  public static final int HIDDEN_COUNT = 20;
  public static final int ITERATIONS = 10;

  public static long BenchmarkEncog(double[][] input, double[][] output) {
    BasicNetwork network = new BasicNetwork();
    network.addLayer(new BasicLayer(new ActivationSigmoid(), true,
        input[0].length));
    network.addLayer(new BasicLayer(new ActivationSigmoid(), true,
        HIDDEN_COUNT));
    network.addLayer(new BasicLayer(new ActivationSigmoid(), false,
        output[0].length));
    network.getStructure().finalizeStructure();
    network.reset();

    MLDataSet trainingSet = new BasicMLDataSet(input, output);
View Full Code Here

public class MouseFactory {
 
  public static NeuralMouse generateMouse(Maze maze)
  {
    BasicNetwork network = new BasicNetwork();
    network.addLayer(new BasicLayer(Constants.INPUT_NEURON_COUNT));
    network.addLayer(new BasicLayer(60));
    //network.addLayer(new BasicLayer(30));
    network.addLayer(new BasicLayer(Constants.OUTPUT_NEURON_COUNT));
    network.getStructure().finalizeStructure();
    network.reset();
   
    NeuralMouse mouse = new NeuralMouse(network,maze);
    return mouse;
View Full Code Here

    return temp.process(this.normalizedSunspots);
  }

  public BasicNetwork createNetwork() {
    BasicNetwork network = new BasicNetwork();
    network.addLayer(new BasicLayer(WINDOW_SIZE));
    network.addLayer(new BasicLayer(10));
    network.addLayer(new BasicLayer(1));
    network.getStructure().finalizeStructure();
    network.reset();
    return network;
  }
View Full Code Here

   */
  public static void main(final String args[]) {
   
    // create a neural network, without using a factory
    BasicNetwork network = new BasicNetwork();
    network.addLayer(new BasicLayer(null,true,2));
    network.addLayer(new BasicLayer(new ActivationSigmoid(),true,3));
    network.addLayer(new BasicLayer(new ActivationSigmoid(),false,1));
    network.getStructure().finalizeStructure();
    network.reset();

    // create training data
    MLDataSet trainingSet = new BasicMLDataSet(XOR_INPUT, XOR_IDEAL);
View Full Code Here

 
  public static void perform(int thread)
  {
    long start = System.currentTimeMillis();
    final BasicNetwork network = new BasicNetwork();
    network.addLayer(new BasicLayer(MultiBench.INPUT_COUNT));
    network.addLayer(new BasicLayer(MultiBench.HIDDEN_COUNT));
    network.addLayer(new BasicLayer(MultiBench.OUTPUT_COUNT));
    network.getStructure().finalizeStructure();
    network.reset();
   
    final MLDataSet training = RandomTrainingFactory.generate(1000,50000,
        INPUT_COUNT, OUTPUT_COUNT, -1, 1);
View Full Code Here

  public static double XOR_IDEAL[][] = { { 0.0 }, { 1.0 }, { 1.0 }, { 0.0 } };

  public void trainAndSave() {
    System.out.println("Training XOR network to under 1% error rate.");
    BasicNetwork network = new BasicNetwork();
    network.addLayer(new BasicLayer(2));
    network.addLayer(new BasicLayer(2));
    network.addLayer(new BasicLayer(1));
    network.getStructure().finalizeStructure();
    network.reset();

    MLDataSet trainingSet = new BasicMLDataSet(XOR_INPUT, XOR_IDEAL);
View Full Code Here

 
  public void testLayerOutput()
  {
    Layer layer1, layer2;
    BasicNetwork network = new BasicNetwork();
    network.addLayer(layer1 = new BasicLayer(null, true,2));
    network.addLayer(layer2 = new BasicLayer(new ActivationSigmoid(), true,4));
    network.addLayer(new BasicLayer(new ActivationSigmoid(), false,1));
    int i = 0;
    i++;
    layer1.setBiasActivation(0.5);
    layer2.setBiasActivation(-1.0);
    network.getStructure().finalizeStructure();
View Full Code Here

  }
 
  public void testLayerOutputPostFinalize()
  {
    BasicNetwork network = new BasicNetwork();
    network.addLayer(new BasicLayer(null, true,2));
    network.addLayer(new BasicLayer(new ActivationSigmoid(), true,4));
    network.addLayer(new BasicLayer(new ActivationSigmoid(), false,1));

    network.getStructure().finalizeStructure();
    network.reset();
   
    network.setLayerBiasActivation(0,0.5);
View Full Code Here

  public static BasicNetwork createXORNetworkUntrained()
  {
    // random matrix data.  However, it provides a constant starting point
    // for the unit tests.   
    BasicNetwork network = new BasicNetwork();
    network.addLayer(new BasicLayer(null,true,2));
    network.addLayer(new BasicLayer(new ActivationSigmoid(),true,4));
    network.addLayer(new BasicLayer(new ActivationSigmoid(),false,1));
    network.getStructure().finalizeStructure();
   
    (new ConsistentRandomizer(-1,1)).randomize(network);
   
    return network;
View Full Code Here

TOP

Related Classes of org.encog.neural.networks.layers.BasicLayer

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.