Package org.encog.engine.network.activation

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


    if (dialog.process()) {
      ElmanPattern elman = new ElmanPattern();
      elman.setInputNeurons(dialog.getInputCount().getValue());
      elman.addHiddenLayer(dialog.getHiddenCount().getValue());
      elman.setOutputNeurons(dialog.getOutputCount().getValue());
      elman.setActivationFunction(new ActivationTANH());
      return elman.generate();
    } else
      return null;

  }
View Full Code Here


  }

  private static MLMethod createFeedForward() {
    CreateFeedforward dialog = new CreateFeedforward(EncogWorkBench
        .getInstance().getMainWindow());
    dialog.setActivationFunctionHidden(new ActivationTANH());
    dialog.setActivationFunctionOutput(new ActivationTANH());
   
    if (dialog.process()) {
      FeedForwardPattern feedforward = new FeedForwardPattern();
      feedforward.setActivationFunction(dialog.getActivationFunctionHidden());
      feedforward.setActivationOutput(dialog.getActivationFunctionOutput());
View Full Code Here

  }

  private static BasicNetwork createAutomatic() {
    CreateAutomatic dialog = new CreateAutomatic(EncogWorkBench
        .getInstance().getMainWindow());
    dialog.setActivationFunction(new ActivationTANH());
   
    dialog.getWeightTries().setValue(5);
    dialog.getIterations().setValue(25);
    dialog.getWindowSize().setValue(10);
View Full Code Here

    dialog.setActivationFunctionOutput(oldActivationOutput);
    dialog.getInputCount().setValue(network.getInputCount());
    dialog.getOutputCount().setValue(network.getOutputCount());
    int hiddenLayerCount = network.getLayerCount() - 2;

    ActivationFunction oldActivationHidden = new ActivationTANH();
    for (int i = 0; i < hiddenLayerCount; i++) {
      int num = network.getLayerNeuronCount(i + 1);
      String str = "Hidden Layer " + (i + 1) + ": " + num + " neurons";
      dialog.getHidden().getModel().addElement(str);
    }
View Full Code Here

    if (name.equalsIgnoreCase(MLActivationFactory.AF_STEP)) {
      return new ActivationStep();
    }

    if (name.equalsIgnoreCase(MLActivationFactory.AF_TANH)) {
      return new ActivationTANH();
    }
   
    if( name.equalsIgnoreCase(MLActivationFactory.AF_SSIGMOID)) {
      return new ActivationSteepenedSigmoid();
    }
View Full Code Here

   * @param target
   *            The target layer.
   */
  public void connectLayers(final FreeformLayer source,
      final FreeformLayer target) {
    connectLayers(source, target, new ActivationTANH(), 1.0, false);
  }
View Full Code Here

  public FlatNetwork(final int input, final int hidden1, final int hidden2,
      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,
View Full Code Here

   *
   * @param neuronCount
   *            How many neurons in this layer.
   */
  public BasicLayer(final int neuronCount) {
    this(new ActivationTANH(), true, neuronCount);
  }
View Full Code Here

      final boolean tanh) {
    final FeedForwardPattern pattern = new FeedForwardPattern();
    pattern.setInputNeurons(input);
    pattern.setOutputNeurons(output);
    if (tanh) {
      pattern.setActivationFunction(new ActivationTANH());
    } else {
      pattern.setActivationFunction(new ActivationSigmoid());
    }

    if (hidden1 > 0) {
View Full Code Here

  }
 
  public void testActivationTemporal()
  {
    TemporalMLDataSet temporal = new TemporalMLDataSet(5,1);
    temporal.addDescription(new TemporalDataDescription(new ActivationTANH(),Type.RAW, true, false));
    temporal.addDescription(new TemporalDataDescription(new ActivationTANH(),Type.RAW, true, false));
    temporal.addDescription(new TemporalDataDescription(new ActivationTANH(),Type.RAW, false, true));
    for(int i=0;i<10;i++)
    {
      TemporalPoint tp = temporal.createPoint(i);
      tp.setData(0, 1.0+(i*3));
      tp.setData(1, 2.0+(i*3));
 
View Full Code Here

TOP

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

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.