Examples of FreeformNeuron


Examples of org.encog.neural.freeform.FreeformNeuron

        final double gradient = connection.getSource().getActivation()
            * toNeuron.getTempTraining(0);
        connection.addTempTraining(0, gradient);

        // calculate the next layer delta
        final FreeformNeuron fromNeuron = connection.getSource();
        double sum = 0;
        for (final FreeformConnection toConnection : fromNeuron
            .getOutputs()) {
          sum += toConnection.getTarget().getTempTraining(0)
              * toConnection.getWeight();
        }
        final double neuronOutput = fromNeuron.getActivation();
        final double neuronSum = fromNeuron.getSum();
        double deriv = toNeuron.getInputSummation()
            .getActivationFunction()
            .derivativeFunction(neuronSum, neuronOutput);

        if (this.fixFlatSopt
            && (toNeuron.getInputSummation()
                .getActivationFunction() instanceof ActivationSigmoid)) {
          deriv += FreeformPropagationTraining.FLAT_SPOT_CONST;
        }

        final double layerDelta = sum * deriv;
        fromNeuron.setTempTraining(0, layerDelta);
      }

      // recurse to the next level
      for (final FreeformConnection connection : toNeuron
          .getInputSummation().list()) {
        final FreeformNeuron fromNeuron = connection.getSource();
        calculateNeuronGradient(fromNeuron);
      }

    }

View Full Code Here

Examples of org.encog.neural.freeform.FreeformNeuron

      errorCalc.updateError(actual.getData(), ideal.getData(), sig);

      for (int i = 0; i < this.network.getOutputCount(); i++) {
        final double diff = (ideal.getData(i) - actual.getData(i))
            * sig;
        final FreeformNeuron neuron = this.network.getOutputLayer()
            .getNeurons().get(i);
        calculateOutputDelta(neuron, diff);
        calculateNeuronGradient(neuron);
      }
    }
View Full Code Here

Examples of org.encog.neural.freeform.FreeformNeuron

      errorCalc.updateError(actual.getData(), ideal.getData(), sig);

      for (int i = 0; i < this.network.getOutputCount(); i++) {
        final double diff = (ideal.getData(i) - actual.getData(i))
            * sig;
        final FreeformNeuron neuron = this.network.getOutputLayer()
            .getNeurons().get(i);
        calculateOutputDelta(neuron, diff);
        calculateNeuronGradient(neuron);
      }
     
View Full Code Here

Examples of org.encog.neural.freeform.FreeformNeuron

  /**
   * {@inheritDoc}
   */
  @Override
  public FreeformNeuron factorContext(final FreeformNeuron neuron) {
    final FreeformNeuron result = new FreeformContextNeuron(neuron);
    return result;
  }
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.