Package com.neuralnetwork.shared.util

Examples of com.neuralnetwork.shared.util.NetworkConfig


   * Test method for {@link com.neuralnetwork
   * .shared.util.NetworkConfig#NetworkConfig(int, int, int[])}.
   */
  @Test
  public final void testNetworkConfig() {
    NetworkConfig conf = new NetworkConfig(FIVE, FIVE,
        new int[]{THREE, 2, THREE});
    conf.getNumInputs();
    try {
      conf = new NetworkConfig(
          -FIVE, FIVE, new int[]{THREE, 2, THREE});
      conf.getNumInputs();
    } catch (IllegalArgumentException e) {
      assertEquals(e.getMessage(), "Error bad configuration.");
    }
   
    try {
      conf = new NetworkConfig(
          FIVE, -FIVE, new int[]{THREE, 2, THREE});
      conf.getNumInputs();
    } catch (IllegalArgumentException e1) {
      assertEquals(e1.getMessage(), "Error bad configuration.");
    }
   
  }
View Full Code Here


   * Test method for {@link com.neuralnetwork
   * .shared.util.NetworkConfig#getNumInputs()}.
   */
  @Test
  public final void testGetNumInputs() {
    NetworkConfig conf = new NetworkConfig(FIVE, FIVE,
        new int[]{THREE, 2, THREE});
    assertEquals(conf.getNumInputs(), FIVE);
  }
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.util.NetworkConfig#getLayerSizes()}.
   */
  @Test
  public final void testGetLayerSizes() {
    NetworkConfig conf = new NetworkConfig(FIVE, FIVE,
        new int[]{THREE, 2, THREE});
    assertEquals(conf.getLayerSizes()[0], THREE);
    assertEquals(conf.getLayerSizes()[1], 2);
    assertEquals(conf.getLayerSizes()[2], THREE);
  }
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.util.NetworkConfig#setLayerSizes(int[])}.
   */
  @Test
  public final void testSetLayerSizes() {
    NetworkConfig conf = new NetworkConfig(FIVE, FIVE,
        new int[]{THREE, 2, THREE});
    conf.setLayerSizes(new int[]{0, 1, 0});
    assertEquals(conf.getLayerSizes()[0], 0);
    assertEquals(conf.getLayerSizes()[1], 1);
    assertEquals(conf.getLayerSizes()[2], 0);
  }
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.util.NetworkConfig#getNumHiddenLayers()}.
   */
  @Test
  public final void testGetNumHiddenLayers() {
    NetworkConfig conf = new NetworkConfig(FIVE, FIVE,
        new int[]{THREE, 2, THREE});
    assertEquals(conf.getNumHiddenLayers(), THREE);
  }
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.util.NetworkConfig#getNumOuputs()}.
   */
  @Test
  public final void testGetNumOuputs() {
    NetworkConfig conf = new NetworkConfig(FIVE, FIVE,
        new int[]{THREE, 2, THREE});
    assertEquals(conf.getNumOuputs(), FIVE);
  }
View Full Code Here

  /**
   * Test simple network config.
   */
  @Test
  public final void testSimpleNetwork() {
    NetworkConfig snc = SimpleNetworkConfigs.CONFIG_5_4_3_4_5;
    snc.getLayerSizes();
    snc = null;
  }
View Full Code Here

TOP

Related Classes of com.neuralnetwork.shared.util.NetworkConfig

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.