Examples of dumpWeights()


Examples of org.encog.neural.networks.BasicNetwork.dumpWeights()

    MLDataSet trainingData = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);
   
    BasicNetwork network = EncogUtility.simpleFeedForward(2, 5, 7, 1, true);
    Randomizer randomizer = new ConsistentRandomizer(-1, 1, 19);
    //randomizer.randomize(network);
    System.out.println(network.dumpWeights());
    MLTrain rprop = new ResilientPropagation(network, trainingData);
    int iteration = 0;
    do {
      rprop.iteration();
      System.out.println(rprop.getError());
View Full Code Here

Examples of org.encog.neural.networks.BasicNetwork.dumpWeights()

    Assert.assertEquals(2, network.getInputCount());
    PruneSelective prune = new PruneSelective(network);
    prune.prune(0, 1);
    Assert.assertEquals(22, network.encodedArrayLength());
    Assert.assertEquals(1,network.getLayerNeuronCount(0));
    Assert.assertEquals("1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20,22,23,25", network.dumpWeights());
   
    BasicNetwork model = EncogUtility.simpleFeedForward(1,3,0,4,false);
    checkWithModel(model.getStructure().getFlat(),network.getStructure().getFlat());
    Assert.assertEquals(1, network.getInputCount());
  }
View Full Code Here

Examples of org.encog.neural.networks.BasicNetwork.dumpWeights()

    BasicNetwork network = obtainNetwork();
    PruneSelective prune = new PruneSelective(network);
    prune.prune(1, 1);
    Assert.assertEquals(18, network.encodedArrayLength());
    Assert.assertEquals(2,network.getLayerNeuronCount(1));
    Assert.assertEquals("1,3,4,5,7,8,9,11,12,13,15,16,17,18,19,23,24,25", network.dumpWeights());
   
    BasicNetwork model = EncogUtility.simpleFeedForward(2,2,0,4,false);
    checkWithModel(model.getStructure().getFlat(),network.getStructure().getFlat());   
  }
 
View Full Code Here

Examples of org.encog.neural.networks.BasicNetwork.dumpWeights()

    Assert.assertEquals(4, network.getOutputCount());
    PruneSelective prune = new PruneSelective(network);
    prune.prune(2, 1);
    Assert.assertEquals(21, network.encodedArrayLength());
    Assert.assertEquals(3,network.getLayerNeuronCount(2));
    Assert.assertEquals("1,2,3,4,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25", network.dumpWeights());
   
    BasicNetwork model = EncogUtility.simpleFeedForward(2,3,0,3,false);
    checkWithModel(model.getStructure().getFlat(),network.getStructure().getFlat());
    Assert.assertEquals(3, network.getOutputCount());
  }
View Full Code Here

Examples of org.encog.neural.networks.BasicNetwork.dumpWeights()

    double[] d = { 0,0,0,0,0,0,0,0,0,0,0,0,0 };
    BasicNetwork network = EncogUtility.simpleFeedForward(2,3,0,1,false);
    NetworkCODEC.arrayToNetwork(d, network);
    PruneSelective prune = new PruneSelective(network);
    prune.randomizeNeuron(100, 100, 0,1);
    Assert.assertEquals("0,0,0,0,0,100,0,0,100,0,0,100,0", network.dumpWeights());
  }
 
  public void testRandomizeNeuronHidden()
  {
    double[] d = { 0,0,0,0,0,0,0,0,0,0,0,0,0 };
View Full Code Here

Examples of org.encog.neural.networks.BasicNetwork.dumpWeights()

    double[] d = { 0,0,0,0,0,0,0,0,0,0,0,0,0 };
    BasicNetwork network = EncogUtility.simpleFeedForward(2,3,0,1,false);
    NetworkCODEC.arrayToNetwork(d, network);
    PruneSelective prune = new PruneSelective(network);
    prune.randomizeNeuron(100, 100, 1,1);
    Assert.assertEquals("0,100,0,0,0,0,0,100,100,100,0,0,0", network.dumpWeights());
  }
 
  public void testRandomizeNeuronOutput()
  {
    double[] d = { 0,0,0,0,0,0,0,0,0,0,0,0,0 };
View Full Code Here

Examples of org.encog.neural.networks.BasicNetwork.dumpWeights()

    double[] d = { 0,0,0,0,0,0,0,0,0,0,0,0,0 };
    BasicNetwork network = EncogUtility.simpleFeedForward(2,3,0,1,false);
    NetworkCODEC.arrayToNetwork(d, network);
    PruneSelective prune = new PruneSelective(network);
    prune.randomizeNeuron(100, 100, 2,0);
    Assert.assertEquals("100,100,100,100,0,0,0,0,0,0,0,0,0", network.dumpWeights());
  }
}
View Full Code Here

Examples of org.encog.neural.networks.BasicNetwork.dumpWeights()

    Assert.assertEquals(2, network.getInputCount());
    PruneSelective prune = new PruneSelective(network);
    prune.prune(0, 1);
    Assert.assertEquals(22, network.encodedArrayLength());
    Assert.assertEquals(1,network.getLayerNeuronCount(0));
    Assert.assertEquals("1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20,22,23,25", network.dumpWeights());
   
    BasicNetwork model = EncogUtility.simpleFeedForward(1,3,0,4,false);
    checkWithModel(model.getStructure().getFlat(),network.getStructure().getFlat());
    Assert.assertEquals(1, network.getInputCount());
  }
View Full Code Here

Examples of org.encog.neural.networks.BasicNetwork.dumpWeights()

    BasicNetwork network = obtainNetwork();
    PruneSelective prune = new PruneSelective(network);
    prune.prune(1, 1);
    Assert.assertEquals(18, network.encodedArrayLength());
    Assert.assertEquals(2,network.getLayerNeuronCount(1));
    Assert.assertEquals("1,3,4,5,7,8,9,11,12,13,15,16,17,18,19,23,24,25", network.dumpWeights());
   
    BasicNetwork model = EncogUtility.simpleFeedForward(2,2,0,4,false);
    checkWithModel(model.getStructure().getFlat(),network.getStructure().getFlat());   
  }
 
View Full Code Here

Examples of org.encog.neural.networks.BasicNetwork.dumpWeights()

    Assert.assertEquals(4, network.getOutputCount());
    PruneSelective prune = new PruneSelective(network);
    prune.prune(2, 1);
    Assert.assertEquals(21, network.encodedArrayLength());
    Assert.assertEquals(3,network.getLayerNeuronCount(2));
    Assert.assertEquals("1,2,3,4,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25", network.dumpWeights());
   
    BasicNetwork model = EncogUtility.simpleFeedForward(2,3,0,3,false);
    checkWithModel(model.getStructure().getFlat(),network.getStructure().getFlat());
    Assert.assertEquals(3, network.getOutputCount());
  }
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.