Package org.neuroph.nnet.comp

Examples of org.neuroph.nnet.comp.BiasNeuron


                if (neuronProperties.hasProperty("useBias")) {
                    useBias = (Boolean)neuronProperties.getProperty("useBias");
                }

                if (useBias) {
                    layer.addNeuron(new BiasNeuron());
                }

                this.addLayer(layer);

    // create layers
    Layer prevLayer = layer;

    //for(Integer neuronsNum : neuronsInLayers)
                for(int layerIdx = 1; layerIdx < neuronsInLayers.size(); layerIdx++){
                        Integer neuronsNum = neuronsInLayers.get(layerIdx);
      // createLayer layer
      layer = LayerFactory.createLayer(neuronsNum, neuronProperties);

                        if ( useBias && (layerIdx< (neuronsInLayers.size()-1)) ) {
                            layer.addNeuron(new BiasNeuron());
                        }

      // add created layer to network
      this.addLayer(layer);
      // createLayer full connectivity between previous and this layer
View Full Code Here


    NeuronProperties inNeuronProperties = new NeuronProperties();
    inNeuronProperties.setProperty("transferFunction", TransferFunctionType.LINEAR);

    // createLayer input layer with specified number of neurons
    Layer inputLayer = LayerFactory.createLayer(inputNeuronsCount, inNeuronProperties);
                inputLayer.addNeuron(new BiasNeuron()); // add bias neuron (always 1, and it will act as bias input for output neuron)
    this.addLayer(inputLayer);
               
               // create output layer neuron settings for this network
    NeuronProperties outNeuronProperties = new NeuronProperties();
    outNeuronProperties.setProperty("transferFunction", TransferFunctionType.RAMP);
View Full Code Here

TOP

Related Classes of org.neuroph.nnet.comp.BiasNeuron

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.