Package org.encog.engine.network.activation

Examples of org.encog.engine.network.activation.ActivationSigmoid


        // 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,3));
        network.addLayer(new BasicLayer(new ActivationSigmoid(),false,3));
        network.addLayer(new BasicLayer(null,false,1));
        network.getStructure().finalizeStructure();
        (new NguyenWidrowRandomizer(-1,1)).randomize( network );
       
        return network;
View Full Code Here


import org.junit.Test;

public class TestActivationSigmoid extends TestCase {
  @Test
  public void testSigmoid() throws Throwable {
    ActivationSigmoid activation = new ActivationSigmoid();
    Assert.assertTrue(activation.hasDerivative());

    ActivationSigmoid clone = (ActivationSigmoid) activation.clone();
    Assert.assertNotNull(clone);

    double[] input = { 0.0  };

    activation.activationFunction(input,0,input.length);
View Full Code Here

  private ChartPanel panel;
 
  public EquationPanel()
  {
    this.setLayout(new BorderLayout());
    setupEquation(new ActivationSigmoid(),true);
  }
View Full Code Here

    addProperty(this.neatActivationField = new PopupField("NEAT activation",
        "NEAT Activation Function", true));


    render();
    this.setNeatActivationFunction(new ActivationSigmoid());
    this.setOutputActivationFunction(new ActivationLinear());
  }
View Full Code Here

      break;
    case 4:
      newActivation = new ActivationLOG();
      break;
    case 5:
      newActivation = new ActivationSigmoid();
      break;
    case 6:
      newActivation = new ActivationSIN();
      break;
    case 7:
View Full Code Here

      pattern.addHiddenLayer(hidden1);
    if( hidden2>0 )
      pattern.addHiddenLayer(hidden2);
   
    if( activation.equalsIgnoreCase("sigmoid") )
      pattern.setActivationFunction(new ActivationSigmoid());
    else if( activation.equalsIgnoreCase("tanh") )
      pattern.setActivationFunction(new ActivationSigmoid());
    else if( activation.equalsIgnoreCase("linear") )
      pattern.setActivationFunction(new ActivationSigmoid());
    else
      throw new EncogScriptError("Uknown activation type: " + activation);
   
    this.network = pattern.generate();
  }
View Full Code Here

    Encog.getInstance().registerPlugin(new EncogOpenCLPlugin());
   
    // create a neural network, without using a factory
    BasicNetwork network = new BasicNetwork();
    network.addLayer(new BasicLayer(null,false,2));
    network.addLayer(new BasicLayer(new ActivationSigmoid(),true,3));
    network.addLayer(new BasicLayer(new ActivationSigmoid(),true,1));
    network.getStructure().finalizeStructure();
    network.reset();
    new ConsistentRandomizer(-1,1).randomize(network);

    // create training data
View Full Code Here

   
    private String filePath=null;
    public NeuralNetworkWrapper(int inputNeurons,int outputNeurons){
        neuralNetwork=new BasicNetwork();
        neuralNetwork.addLayer(new BasicLayer(null,true,inputNeurons));
  neuralNetwork.addLayer(new BasicLayer(new ActivationSigmoid(),true,ProgramConfig.NEURAL_HIDDEN_LAYER_LENGTH));
  neuralNetwork.addLayer(new BasicLayer(new ActivationSigmoid(),false,outputNeurons));
  neuralNetwork.getStructure().finalizeStructure();
  neuralNetwork.reset();
       
    }
View Full Code Here

        this.filePath=filePath;
        File file=new File(filePath);
        if(file==null || !file.exists()){
            neuralNetwork=new BasicNetwork();
            neuralNetwork.addLayer(new BasicLayer(null,true,inputNeurons));
            neuralNetwork.addLayer(new BasicLayer(new ActivationSigmoid(),true,ProgramConfig.NEURAL_HIDDEN_LAYER_LENGTH));
            neuralNetwork.addLayer(new BasicLayer(new ActivationSigmoid(),false,outputNeurons));
            neuralNetwork.getStructure().finalizeStructure();
            neuralNetwork.reset();
        }else{
            neuralNetwork=(BasicNetwork)EncogDirectoryPersistence.loadObject(file);
        }
View Full Code Here

    if (name.equalsIgnoreCase(MLActivationFactory.AF_RAMP)) {
      return new ActivationRamp();
    }

    if (name.equalsIgnoreCase(MLActivationFactory.AF_SIGMOID)) {
      return new ActivationSigmoid();
    }

    if (name.equalsIgnoreCase(MLActivationFactory.AF_SIN)) {
      return new ActivationSIN();
    }
View Full Code Here

TOP

Related Classes of org.encog.engine.network.activation.ActivationSigmoid

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.