Package com.neuralnetwork.shared.neurons

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


     * @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

     * @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

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

  /**
   * 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

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

TOP

Related Classes of com.neuralnetwork.shared.neurons.BiasNeuron

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.