Package com.neuralnetwork.shared.network

Examples of com.neuralnetwork.shared.network.INetwork.build()


  @Test
    public final void testSetInputLayer() {
    INetwork n = new Network(FIVE, FIVE, THREE,
        new int[] {FOUR, TWO, FOUR});
    n.setInputLayer(new InputLayer(THREE * TWO));
    n.build();
    assertEquals(LayerType.INPUT, n.getInputLayer().getLayerType());
    assertEquals(THREE * TWO, n.getInputLayer().getSize());
  }

  /**
 
View Full Code Here


   */
  @Test
    public final void testBuild() {
    INetwork n = new Network(FIVE, FIVE, THREE,
        new int[] {FOUR, TWO, FOUR});
    n.build();
    assertNotNull(n);
  }

  /**
   * Test method for {@link com.neuralnetwork
View Full Code Here

   */
  @Test
    public final void testToString() {
    INetwork n = new Network(FIVE, FIVE, THREE,
        new int[] {FOUR, TWO, FOUR});
    n.build();
    LOGGER.debug(n.toString());
    assertTrue(
               n.toString().contains(
               "IN(0.0) IN(0.0) IN(0.0) IN(0.0) IN(0.0)"));
  }
View Full Code Here

   * .shared.network.Network#Network(int, int, int)}.
   */
  @Test
    public final void testNetworkIntIntIntIntArray() {
    INetwork n = new Network(TWO, THREE, ONE, new int[] {THREE});
    n.build();
    assertNotNull(n);
   
    try {
      n = new Network(TWO, THREE, -ONE, new int[] {THREE});
    } catch (IllegalArgumentException e) {
View Full Code Here

   * .shared.network.Network#Network(int, int)}.
   */
  @Test
    public final void testNetworkIntInt() {
    INetwork n = new Network(FIVE, FIVE);
    n.build();
    assertNotNull(n);
  }

  /**
   * Test method for {@link com.neuralnetwork
View Full Code Here

   */
  @Test
    public final void testGetNeuron() {
    INetwork n = new Network(FIVE, FIVE, THREE,
        new int[] {FOUR, TWO, FOUR});
    n.build();
    assertNotNull(n);
    assertNotNull(n.getNeuron(0, 0));
    assertNotNull(n.getNeuron(ONE, 0));
    assertNotNull(n.getNeuron(TWO, 0));
    assertNotNull(n.getNeuron(THREE, 0));
View Full Code Here

   */
  @Test
    public final void testGetOutputNeuron() {
    INetwork n = new Network(FIVE, FIVE, THREE,
        new int[] {FOUR, TWO, FOUR});
    n.build();
    assertEquals(n.getOutputNeuron(0).getType(), NeuronType.OUTPUT);
    assertEquals(n.getOutputNeuron(ONE).getType(), NeuronType.OUTPUT);
    assertEquals(n.getOutputNeuron(TWO).getType(), NeuronType.OUTPUT);
    assertEquals(n.getOutputNeuron(THREE).getType(), NeuronType.OUTPUT);
    assertEquals(n.getOutputNeuron(FOUR).getType(), NeuronType.OUTPUT);
View Full Code Here

   */
  @Test
    public final void testGetInputNeuron() {
    INetwork n = new Network(FIVE, FIVE, THREE,
        new int[] {FOUR, TWO, FOUR});
    n.build();
    assertEquals(n.getInputNeuron(0).getType(), NeuronType.INPUT);
    assertEquals(n.getInputNeuron(ONE).getType(), NeuronType.INPUT);
    assertEquals(n.getInputNeuron(TWO).getType(), NeuronType.INPUT);
    assertEquals(n.getInputNeuron(THREE).getType(), NeuronType.INPUT);
    assertEquals(n.getInputNeuron(FOUR).getType(), NeuronType.INPUT);
View Full Code Here

        INetwork n = new Network(Constants.FIVE, Constants.FIVE,
                                 Constants.THREE,
                                 new int[] {Constants.FOUR,
                                            Constants.TWO,
                                            Constants.FOUR});
        n.build();
        Vector<Double> values = new Vector<Double>();
        values.add(NN_INPUT_VALUE);
        values.add(NN_INPUT_VALUE);
        values.add(NN_INPUT_VALUE);
        values.add(NN_INPUT_VALUE);
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.