Examples of BiasNeuron


Examples of com.neuralnetwork.shared.neurons.BiasNeuron

     * @param w
     *      the length of the input layer.
     */
    public InputLayer(final int w) {
        super(w + 1);
        add(new BiasNeuron());
        setLayerType(LayerType.INPUT);
    }
View Full Code Here

Examples of com.neuralnetwork.shared.neurons.BiasNeuron

     * @param w
     *      the length of the layer
     */
    public OutputLayer(final int w) {
        super(w + 1);
        add((IOutputNeuron) new BiasNeuron());
        super.setLayerType(LayerType.OUTPUT);
    }
View Full Code Here

Examples of com.neuralnetwork.shared.neurons.BiasNeuron

     * @param w
     *      the length of this hidden layer
     */
    public HiddenLayer(final int w) {
        super(w + 1);
        add(new BiasNeuron());
        super.setLayerType(LayerType.HIDDEN);
    }
View Full Code Here

Examples of com.neuralnetwork.shared.neurons.BiasNeuron

   * #BiasNeuron()}.
   */
  @Test
  public final void testBiasNeuron() {
    assertEquals(
        new BiasNeuron().getValue(), new OneValue());
  }
View Full Code Here

Examples of com.neuralnetwork.shared.neurons.BiasNeuron

  /**
   * Test feedforward methods.
   */
  @Test
  public final void testFeedForward() {
    BiasNeuron bn = new BiasNeuron();
    bn.feedforward(null);
    bn.feedforward(new OneValue(), null);
    assertEquals(bn.getOutputValue(), 1, Constants.TEN);
  }
View Full Code Here

Examples of com.neuralnetwork.shared.neurons.BiasNeuron

  /**
   * Test toString.
   */
  @Test
  public final void testToString() {
    BiasNeuron bn = new BiasNeuron();
    assertEquals(bn.toString(), "BN(1.0)");
  }
View Full Code Here

Examples of org.neuroph.nnet.comp.BiasNeuron

                if (neuronProperties.hasProperty("useBias")) {
                    useBias = (Boolean)neuronProperties.getProperty("useBias");
                }

                if (useBias) {
                    layer.addNeuron(new BiasNeuron());
                }

                this.addLayer(layer);

    // create layers
    Layer prevLayer = layer;

    //for(Integer neuronsNum : neuronsInLayers)
                for(int layerIdx = 1; layerIdx < neuronsInLayers.size(); layerIdx++){
                        Integer neuronsNum = neuronsInLayers.get(layerIdx);
      // createLayer layer
      layer = LayerFactory.createLayer(neuronsNum, neuronProperties);

                        if ( useBias && (layerIdx< (neuronsInLayers.size()-1)) ) {
                            layer.addNeuron(new BiasNeuron());
                        }

      // add created layer to network
      this.addLayer(layer);
      // createLayer full connectivity between previous and this layer
View Full Code Here

Examples of org.neuroph.nnet.comp.BiasNeuron

    NeuronProperties inNeuronProperties = new NeuronProperties();
    inNeuronProperties.setProperty("transferFunction", TransferFunctionType.LINEAR);

    // createLayer input layer with specified number of neurons
    Layer inputLayer = LayerFactory.createLayer(inputNeuronsCount, inNeuronProperties);
                inputLayer.addNeuron(new BiasNeuron()); // add bias neuron (always 1, and it will act as bias input for output neuron)
    this.addLayer(inputLayer);
               
               // create output layer neuron settings for this network
    NeuronProperties outNeuronProperties = new NeuronProperties();
    outNeuronProperties.setProperty("transferFunction", TransferFunctionType.RAMP);
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.core.neurons.BiasNeuron

       

        if (useBiasNeuron) {
         
//          System.out.println("Using Bias Neuron ---------- ");
          layer.addNeuron(new BiasNeuron());
//         System.out.println( "> Adding Bias Neuron to Input Layer "  );
         
        }
   
   
    this.addLayer(layer);

    // create layers
    Layer prevLayer = layer;

    // ################# create the other layers ########################
   
     for (int x = 1; x < conf.getLayerCount(); x++){
             
       Integer neuronsNum = conf.getLayerNeuronCount(x);
   
      
       // createLayer layer
       layer = Layer.createLayer(conf, x);

       if ( useBiasNeuron && (x < ( conf.getLayerCount() - 1 )) ) {
        
         System.out.println( "> Adding Bias Neuron to Layer " + x );
         layer.addNeuron(new BiasNeuron());
            
       }

       this.addLayer(layer);
     
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.core.neurons.BiasNeuron

       

        if (useBiasNeuron) {
         
//          System.out.println("Using Bias Neuron ---------- ");
          layer.addNeuron(new BiasNeuron());
//         System.out.println( "> Adding Bias Neuron to Input Layer "  );
         
        }
   
   
    this.addLayer(layer);

    // create layers
    Layer prevLayer = layer;

    // ################# create the other layers ########################
   
     for (int x = 1; x < conf.getLayerCount(); x++){
             
       Integer neuronsNum = conf.getLayerNeuronCount(x);
   
      
       // createLayer layer
       layer = Layer.createLayer(conf, x);

       if ( useBiasNeuron && (x < ( conf.getLayerCount() - 1 )) ) {
        
         System.out.println( "> Adding Bias Neuron to Layer " + x );
         layer.addNeuron(new BiasNeuron());
            
       }

       this.addLayer(layer);
     
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.