Package org.encog.neural.networks.layers

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


        network = new BasicNetwork();
    }

    public int init() {
        int success;
        Layer outputLayer = new BasicLayer(new ActivationSigmoid(), true, 6);
        Layer hiddenLayer1 = new BasicLayer(new ActivationSigmoid(), true, 6);
        Layer inputLayer = new BasicLayer(new ActivationSigmoid(), false, 4);

        Synapse synapse1 = new WeightedSynapse(hiddenLayer1, outputLayer);
        Synapse synapse2 = new WeightedSynapse(inputLayer, hiddenLayer1);

        hiddenLayer1.addSynapse(synapse1);
        inputLayer.addSynapse(synapse2);

        network.tagLayer("INPUT", inputLayer);
        network.tagLayer("OUTPUT", outputLayer);

        network.getStructure().finalizeStructure();
View Full Code Here


  public final MLMethod generate() {

    if( this.activationOutput==null )
      this.activationOutput = this.activationHidden;
   
    final Layer input = new BasicLayer(null, true,
        this.inputNeurons);

    final BasicNetwork result = new BasicNetwork();
    result.addLayer(input);


    for (final Integer count : this.hidden) {

      final Layer hidden = new BasicLayer(this.activationHidden, true, count);

      result.addLayer(hidden);
    }

    final Layer output = new BasicLayer(this.activationOutput, false,
        this.outputNeurons);
    result.addLayer(output);

    result.getStructure().finalizeStructure();
    result.reset();
View Full Code Here

   * @return The generated network.
   */
  public final MLMethod generate() {
    final BasicNetwork network = new BasicNetwork();

    final Layer inputLayer = new BasicLayer(new ActivationLinear(), true,
        this.inputNeurons);
    final Layer outputLayer = new BasicLayer(new ActivationLinear(), false,
        this.outputNeurons);

    network.addLayer(inputLayer);
    network.addLayer(outputLayer);
    network.getStructure().finalizeStructure();
View Full Code Here

public class TestBiasActivation extends TestCase {
 
  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();
    network.reset();
   
    FlatNetwork flat = network.getStructure().getFlat();
View Full Code Here

public class TestBiasActivation extends TestCase {
 
  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();
    network.reset();
   
    FlatNetwork flat = network.getStructure().getFlat();
View Full Code Here

  public MLMethod generate() {

    if( this.activationOutput==null )
      this.activationOutput = this.activationHidden;
   
    final Layer input = new BasicLayer(null, true,
        this.inputNeurons);

    final BasicNetwork result = new BasicNetwork();
    result.addLayer(input);


    for (final Integer count : this.hidden) {

      final Layer hidden = new BasicLayer(this.activationHidden, true, count);

      result.addLayer(hidden);
    }

    final Layer output = new BasicLayer(this.activationOutput, false,
        this.outputNeurons);
    result.addLayer(output);

    result.getStructure().finalizeStructure();
    result.reset();
View Full Code Here

   * @return The generated network.
   */
  public MLMethod generate() {
    final BasicNetwork network = new BasicNetwork();

    final Layer inputLayer = new BasicLayer(new ActivationLinear(), true,
        this.inputNeurons);
    final Layer outputLayer = new BasicLayer(new ActivationLinear(), false,
        this.outputNeurons);

    network.addLayer(inputLayer);
    network.addLayer(outputLayer);
    network.getStructure().finalizeStructure();
View Full Code Here

TOP

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

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.