Examples of ActivationFunction


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

        flat.setActivationFunctions(new ActivationFunction[flat
            .getLayerCounts().length]);

        for (final String line : section.getLines()) {
          ActivationFunction af = null;
          final List<String> cols = EncogFileSection
              .splitColumns(line);
         
          // if this is a class name with a path, then do not default to inside of the Encog package.
          String name;
          if( cols.get(0).indexOf('.')!=-1 ) {
            name = cols.get(0);
          } else {
            name = "org.encog.engine.network.activation."
                + cols.get(0);
          }
         
          try {
            final Class<?> clazz = Class.forName(name);
            af = (ActivationFunction) clazz.newInstance();
          } catch (final ClassNotFoundException e) {
            throw new PersistError(e);
          } catch (final InstantiationException e) {
            throw new PersistError(e);
          } catch (final IllegalAccessException e) {
            throw new PersistError(e);
          }

          for (int i = 0; i < af.getParamNames().length; i++) {
            af.setParam(i,
                CSVFormat.EG_FORMAT.parse(cols.get(i + 1)));
          }

          flat.getActivationFunctions()[index++] = af;
        }
View Full Code Here

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

          } else if (cols.get(0).equalsIgnoreCase("n")) {
            final NEATNeuronGene neuronGene = new NEATNeuronGene();
            final int geneID = Integer.parseInt(cols.get(1));
            neuronGene.setId(geneID);

            final ActivationFunction af = EncogFileSection
                .parseActivationFunction(cols.get(2));
            neuronGene.setActivationFunction(af);

            neuronGene.setNeuronType(PersistNEATPopulation
                .stringToNeuronType(cols.get(3)));
View Full Code Here

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

    if (pop.isHyperNEAT()) {
      out.writeProperty(NEATPopulation.PROPERTY_NEAT_ACTIVATION,
          PersistNEATPopulation.TYPE_CPPN);
    } else {
      final ActivationFunction af = pop.getActivationFunctions()
          .getList().get(0).getObj();
      out.writeProperty(NEATPopulation.PROPERTY_NEAT_ACTIVATION, af);
    }

    out.writeProperty(PersistConst.INPUT_COUNT, pop.getInputCount());
View Full Code Here

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

        flat.setActivationFunctions(new ActivationFunction[flat
            .getLayerCounts().length]);

        for (final String line : section.getLines()) {
          ActivationFunction af = null;
          final List<String> cols = EncogFileSection
              .splitColumns(line);
          final String name = "org.encog.engine.network.activation."
              + cols.get(0);
          try {
            final Class<?> clazz = Class.forName(name);
            af = (ActivationFunction) clazz.newInstance();
          } catch (final ClassNotFoundException e) {
            throw new PersistError(e);
          } catch (final InstantiationException e) {
            throw new PersistError(e);
          } catch (final IllegalAccessException e) {
            throw new PersistError(e);
          }

          for (int i = 0; i < af.getParamNames().length; i++) {
            af.setParam(i,
                CSVFormat.EG_FORMAT.parse(cols.get(i + 1)));
          }

          flat.getActivationFunctions()[index++] = af;
        }
View Full Code Here

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

   */
  private Randomizer getRandomizer() {
    boolean useNWR = true;
   
    for(int i=0;i<this.getLayerCount();i++) {
      ActivationFunction af = getActivation(i);
      if( af.getClass()!=ActivationSigmoid.class
          && af.getClass()!=ActivationTANH.class
          && af.getClass()!=ActivationElliott.class
          && af.getClass()!=ActivationElliottSymmetric.class) {
        useNWR = false;
      }
    }
   
    if (getLayerCount() < 3) {
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.activation.ActivationFunction

        neuron.setError( 0 );
                x++;
        continue;
      }
     
      ActivationFunction transferFunction = neuron.getActivationFunction();
      double neuronInput = neuron.getNetInput();
      double delta = outputError[ x ] * transferFunction.getDerivative( neuronInput ); // delta = (d-y)*df(net)
      neuron.setError( delta );
                       
      this.updateNeuronWeights( neuron );       
      x++;
     
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.activation.ActivationFunction

        neuron.setError( 0 );
                x++;
        continue;
      }
     
      ActivationFunction transferFunction = neuron.getActivationFunction();
      double neuronInput = neuron.getNetInput();
      double delta = outputError[ x ] * transferFunction.getDerivative( neuronInput ); // delta = (d-y)*df(net)
      neuron.setError( delta );
                       
      this.updateNeuronWeights( neuron );       
      x++;
     
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.activation.ActivationFunction

     
    } // for

   
   
    ActivationFunction transferFunction = neuron.getActivationFunction();
   
   
    double netInput = neuron.getNetInput(); // should we use input of this or other neuron?
    double fnDerv = transferFunction.getDerivative(netInput);
    double neuronError = fnDerv * deltaSum;
    return neuronError;
 
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.activation.ActivationFunction

 
 
  public static Neuron createNeuron(Config c, int layerIndex) {
   
    Neuron n = null;
    ActivationFunction tf = null;
   
    if (0 == layerIndex) {
      n = new InputNeuron();
     
    } else {
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.activation.ActivationFunction

 
 
  public static Neuron createNeuron(Config c, int layerIndex) {
   
    Neuron n = null;
    ActivationFunction tf = null;
   
    if (0 == layerIndex) {
      n = new InputNeuron();
     
    } else {
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.