Package tv.floe.metronome.classification.neuralnetworks.core

Examples of tv.floe.metronome.classification.neuralnetworks.core.Layer


    mlp_network.setInputVector(vec);
   
    //mlp_network.
   
    Layer l0 = mlp_network.getLayerByIndex(0);
   
    assertEquals( 2, l0.getNeurons().size() );
   
    assertEquals(0, l0.getNeuronAt(0).getInConnections().size() );
    assertEquals(0, l0.getNeuronAt(1).getInConnections().size() );

    assertEquals(3, l0.getNeuronAt(0).getOutConnections().size() );
    assertEquals(3, l0.getNeuronAt(1).getOutConnections().size() );

   
   
    Layer l1 = mlp_network.getLayerByIndex(1);

    assertEquals( 3, l1.getNeurons().size() );
   
    assertEquals(2, l1.getNeuronAt(0).getInConnections().size() );
    assertEquals(2, l1.getNeuronAt(1).getInConnections().size() );
    assertEquals(2, l1.getNeuronAt(2).getInConnections().size() );

    assertEquals(2, l1.getNeuronAt(0).getOutConnections().size() );
    assertEquals(2, l1.getNeuronAt(1).getOutConnections().size() );
    assertEquals(2, l1.getNeuronAt(2).getOutConnections().size() );
   
   
   
    Layer l2 = mlp_network.getLayerByIndex(2);
   
    assertEquals( 2, l2.getNeurons().size() );
   
    assertEquals(3, l2.getNeuronAt(0).getInConnections().size() );
    assertEquals(3, l2.getNeuronAt(1).getInConnections().size() );

    assertEquals(0, l2.getNeuronAt(0).getOutConnections().size() );
    assertEquals(0, l2.getNeuronAt(1).getOutConnections().size() );   
   
  }
View Full Code Here


   
   
    this.setNetworkType(NetworkType.MULTI_LAYER_PERCEPTRON);


    Layer layer = Layer.createLayer(conf, 0);
       
        boolean useBiasNeuron = false; // use bias neurons by default
       
        if (null != conf.getConfValue("useBiasNeuron")) {
         
          if ( conf.getConfValue("useBiasNeuron").equals("true") ) {
            useBiasNeuron = true;
          }
         
        }
       

        if (useBiasNeuron) {
         
//          System.out.println("Using Bias Neuron ---------- ");
          layer.addNeuron(new BiasNeuron());
//         System.out.println( "> Adding Bias Neuron to Input Layer "  );
         
        }
   
   
    this.addLayer(layer);

    // create layers
    Layer prevLayer = layer;

    // ################# create the other layers ########################
   
     for (int x = 1; x < conf.getLayerCount(); x++){
             
View Full Code Here

  public void buildFromConf(Config conf) throws Exception {

    this.setNetworkType(NetworkType.MULTI_LAYER_PERCEPTRON);


    Layer layer = Layer.createLayer(conf, 0);
       
        boolean useBiasNeuron = false; // use bias neurons by default
       
        if (null != conf.getConfValue("useBiasNeuron")) {
         
          if ( conf.getConfValue("useBiasNeuron").equals("true") ) {
            useBiasNeuron = true;
          }
         
        }
       

        if (useBiasNeuron) {
         
//          System.out.println("Using Bias Neuron ---------- ");
          layer.addNeuron(new BiasNeuron());
//         System.out.println( "> Adding Bias Neuron to Input Layer "  );
         
        }
   
   
    this.addLayer(layer);

    // create layers
    Layer prevLayer = layer;

    // ################# create the other layers ########################
   
     for (int x = 1; x < conf.getLayerCount(); x++){
             
View Full Code Here

TOP

Related Classes of tv.floe.metronome.classification.neuralnetworks.core.Layer

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.