Package com.neuralnetwork.shared.neurons

Examples of com.neuralnetwork.shared.neurons.OutputNeuron


    }

    @Override
    public final void build() {
        while (getWidth() != size()) {
            add(new OutputNeuron());
        }
    }
View Full Code Here


   * .shared.neurons.AbstractOutputNeuron
   * #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

   * .shared.neurons.AbstractOutputNeuron
   * #getOutputValue()}.
   */
  @Test
  public final void testGetOutputValue() {
    AbstractOutputNeuron ai = new OutputNeuron();
    ai.setValue(new OneValue());
    assertEquals(ai.getType(), NeuronType.OUTPUT);
    assertEquals(ai.getOutputValue(),
                 new OneValue().getValue(), TEN * Math.ulp(1.0));
  }
 
View Full Code Here

   * .shared.neurons.OutputNeuron#OutputNeuron()}.
   */
  @Test
  public final void testOutputNeuron() {
    for (int i = 0; i < NUM_ITER; i++) {
      OutputNeuron o = new OutputNeuron();
      Double v = o.getOutputValue();
      assertTrue(v >= 0);
      assertTrue(v < 1);
    }
  }
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.neurons.OutputNeuron#toString()}.
   */
  @Test
  public final void testToString() {
    OutputNeuron o = new OutputNeuron();
    o.setValue(new DoubleValue(0.0));
    assertEquals(o.toString(), "ON(0.0) ");
  }
View Full Code Here

 
    n.setValue(null);
    n.setType(null);
    n.addOutputLink(new HiddenNeuron());
    assertEquals(n.hashCode(), n.hashCode());
    Neuron v = new OutputNeuron();
    v.setValue(null);
    v.setType(null);
    v.setActivationFunction(null);
    assertEquals(v.hashCode(), v.hashCode());
  }
View Full Code Here

   */
  @Test
  public final void testNeuronNeuronType() {

    Neuron n = new InputNeuron();
    Neuron m = new OutputNeuron();
    Neuron o = new HiddenNeuron();
   
    assertEquals(n.getType(), NeuronType.INPUT);
    assertEquals(m.getType(), NeuronType.OUTPUT);
    assertEquals(o.getType(), NeuronType.HIDDEN);
  }
View Full Code Here

   * .shared.neurons.Neuron#getType()}.
   */
  @Test
  public final void testGetType() {
    Neuron n = new InputNeuron();
    Neuron m = new OutputNeuron();
    Neuron o = new HiddenNeuron();
   
    assertEquals(n.getType(), NeuronType.INPUT);
    assertEquals(m.getType(), NeuronType.OUTPUT);
    assertEquals(o.getType(), NeuronType.HIDDEN);
  }
View Full Code Here

  @Test
  public final void testGetNextParent() {
    Neuron n = new InputNeuron()
    Neuron n1 = new InputNeuron();
    Neuron m = new HiddenNeuron();
    Neuron o = new OutputNeuron();
    Neuron o1 = new OutputNeuron();
    n.addOutputLink(m);
    n1.addOutputLink(m);
    m.addOutputLink(o);
    m.addOutputLink(o1);
   
View Full Code Here

  @Test
  public final void testGetNextChild() {   
    Neuron n = new InputNeuron()
    Neuron n1 = new InputNeuron();
    Neuron m = new HiddenNeuron();
    Neuron o = new OutputNeuron();
    Neuron o1 = new OutputNeuron();
    n.addOutputLink(m);
    n1.addOutputLink(m);
    m.addOutputLink(o);
    m.addOutputLink(o1);
   
View Full Code Here

TOP

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

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.