Package com.neuralnetwork.shared.neurons

Examples of com.neuralnetwork.shared.neurons.OutputNeuron


    @Test
    public final void testFeedforward() {
        Neuron n = new InputNeuron(new DoubleValue(D_0_1));
        Neuron n1 = new InputNeuron(new DoubleValue(D_0_1));
        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


    assertFalse(n.equals(n1));
   
    Neuron i = new InputNeuron();
    Neuron i1 = new InputNeuron();
    Neuron m = new HiddenNeuron();
    Neuron o = new OutputNeuron();
    Neuron o1 = new OutputNeuron();
   
    i.addOutputLink(m);
    i1.addOutputLink(m);
    m.addOutputLink(o);
    m.addOutputLink(o1);
   
    i.getNextChild();
    assertFalse(i.equals(i1));
   
    o.getNextParent();
    assertFalse(o.equals(o1));
    assertFalse(i1.equals(o1));
    Neuron k = new OutputNeuron();
    Neuron k1 = new OutputNeuron();
    k1.addOutputLink(o);
    assertFalse(k.equals(k1));
   
    Neuron l = new OutputNeuron();
    Neuron l1 = new InputNeuron();
    assertFalse(l.equals(l1));
   
    Neuron p = new OutputNeuron();
    p.setValue(new DoubleValue());
    Neuron p1 = new OutputNeuron();
    p1.setValue(new DoubleValue(Constants.TEN));
    assertFalse(p.equals(p1));
   
    p.setValue(null);
    p1.setValue(new DoubleValue(Constants.ELEVEN_D));
    assertFalse(p.equals(p1));
   
    p.setValue(null);
    p1.setValue(null);
    assertEquals(p, p1);
   
  }
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.