Package com.neuralnetwork.shared.values

Examples of com.neuralnetwork.shared.values.ZeroValue


        }

        this.weight = linkWeight;
        this.id = linkWeight;
        if (this.weight == null) {
          this.weight = new ZeroValue();
        }
       
        this.head = ihead;
        this.tail = itail;
    }
View Full Code Here


     *
     * @param nodeId
     *      the id of this node.
     */
    public OpenCLNode(final NeuronType nodeId) {
        super(nodeId, new ZeroValue());
    }
View Full Code Here

    /**
     * Construct an input neuron with
     * no initial input value.
     */
    protected AbstractInputNeuron() {
        super(NeuronType.INPUT, new ZeroValue());
    }
View Full Code Here

     *
     * @param v
     *      the initial value of the neuron
     */
    protected AbstractInputNeuron(final DoubleValue v) {
        super(NeuronType.INPUT, new ZeroValue());
        this.setValue(v);
    }
View Full Code Here

   */
  @Test
  public final void testAbstractInputNeuron() {
    AbstractInputNeuron ai = new InputNeuron();
    assertEquals(ai.getType(), NeuronType.INPUT);
    assertEquals(ai.getValue(), new ZeroValue());
  }
View Full Code Here

   * #AbstractOutputNeuron()}.
   */
  @Test
  public final void testAbstractOutputNeuron() {
    AbstractOutputNeuron ai = new OutputNeuron();
    ai.setValue(new ZeroValue());
    assertEquals(ai.getType(), NeuronType.OUTPUT);
    assertEquals(ai.getValue(), new ZeroValue());
  }
View Full Code Here

   */
  @Test
  public final void testInputNeuron() {
    IInputNeuron n = new InputNeuron();
    assertEquals(n.getType(), NeuronType.INPUT);
    assertEquals(n.getValue(), new ZeroValue());
  }
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.values.ZeroValue#ZeroValue()}.
   */
  @Test
  public final void testZeroValue() {
    assertEquals(new ZeroValue().getValue(),
        0.0, Constants.TEN * Math.ulp(0.0));
  }
 
View Full Code Here

    } catch (NeuronLinkException e) {
      assertEquals(e.getMessage(), "Tail link was null.");
    }
   
    l = new Link(n, n, null);
    assertEquals(l.getWeight(), new ZeroValue());
  }
View Full Code Here

   */
  @Test
    public final void testUpdateWeight() {
    IHiddenNeuron h = new HiddenNeuron();
    IHiddenNeuron t = new HiddenNeuron();
    ILink l = new Link(h, t, new ZeroValue());
    l.updateWeight(new DoubleValue(WEIGHT_TEST_VALUE));
    assertEquals(l.getWeight(), new DoubleValue(WEIGHT_TEST_VALUE));
    l.updateWeight(new DoubleValue(-WEIGHT_TEST_VALUE));
    assertEquals(l.getWeight(), new DoubleValue(0.0));
  }
View Full Code Here

TOP

Related Classes of com.neuralnetwork.shared.values.ZeroValue

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.