Package org.encog.engine.network.activation

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


    else if (t == Linear.class) {
      slope = ((Linear) transfer).getSlope();
      activation = new ActivationLinear();
    } else if (t == Sigmoid.class) {
      slope = ((Sigmoid) transfer).getSlope();
      activation = new ActivationSigmoid();
    } else if (t == Tanh.class) {
      slope = ((Tanh) transfer).getSlope();
      activation = new ActivationTANH();
    } else
      return null;
View Full Code Here


        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);
View Full Code Here

  public final File SERIAL_FILENAME = TEMP_DIR.createFile("encogtest.ser");
   
  private NEATNetwork create()
  {
    List<NEATNeuron> neurons = new ArrayList<NEATNeuron>();
    ActivationFunction afSigmoid = new ActivationSigmoid();
    ActivationFunction afStep = new ActivationStep();
   
    // create the neurons
    NEATNeuron input1 = new NEATNeuron(
        NEATNeuronType.Input,
View Full Code Here

  {
    FeedForwardPattern pattern = new FeedForwardPattern();
    pattern.setInputNeurons(this.input[0].length);
    pattern.setOutputNeurons(this.ideal[0].length);
    pattern.addHiddenLayer(8);
    pattern.setActivationFunction(new ActivationSigmoid());
    return (BasicNetwork)pattern.generate();
  }
View Full Code Here

  {
    JordanPattern pattern = new JordanPattern();
    pattern.setInputNeurons(this.input[0].length);
    pattern.setOutputNeurons(this.ideal[0].length);
    pattern.addHiddenLayer(16);
    pattern.setActivationFunction(new ActivationSigmoid());
    return (BasicNetwork)pattern.generate();
  }
View Full Code Here

public class JordanXOR {

  static BasicNetwork createJordanNetwork() {
    // construct an Jordan type network
    JordanPattern pattern = new JordanPattern();
    pattern.setActivationFunction(new ActivationSigmoid());
    pattern.setInputNeurons(1);
    pattern.addHiddenLayer(6);
    pattern.setOutputNeurons(1);
    return (BasicNetwork)pattern.generate();
  }
View Full Code Here

  }

  static BasicNetwork createFeedforwardNetwork() {
    // construct a feedforward type network
    FeedForwardPattern pattern = new FeedForwardPattern();
    pattern.setActivationFunction(new ActivationSigmoid());
    pattern.setInputNeurons(1);
    pattern.addHiddenLayer(2);
    pattern.setOutputNeurons(1);
    return (BasicNetwork)pattern.generate();
  }
View Full Code Here

      final int output, final boolean tanh) {

    final ActivationFunction linearAct = new ActivationLinear();
    FlatLayer[] layers;
    final ActivationFunction act = tanh ? new ActivationTANH()
        : new ActivationSigmoid();

    if ((hidden1 == 0) && (hidden2 == 0)) {
      layers = new FlatLayer[2];
      layers[0] = new FlatLayer(linearAct, input,
          FlatNetwork.DEFAULT_BIAS_ACTIVATION);
View Full Code Here

   */
  public NEATNetwork(final int inputCount, final int outputCount) {
    this.inputCount = inputCount;
    this.outputCount = outputCount;
    this.networkDepth = 0;
    this.activationFunction = new ActivationSigmoid();
  }
View Full Code Here

   
    for(int i=0;i<1000;i++) {
      // 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(0,0.5,i)).randomize(network);

      // create training data
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.