Ejemplo n.º 1
0
 /*
  * Output layer inits. no weights. no next layer neuron count
  */
 public Layer(LayerLabel label, int nNeurons) {
   this.setnNeurons(nNeurons);
   this.setLabel(label);
   if (!label.equals(LayerLabel.HIDDEN)) {
     this.setNeuronSpikeTimes(new SpikeTimes[nNeurons]);
   }
   this.setnWeights(0);
 }
Ejemplo n.º 2
0
 /*
  * Input and Hidden layer initialization
  * requires nNeurons as well as next layer neuron count
  */
 public Layer(LayerLabel label, int nNeurons, int nNeuronsNxtLyr) {
   this.setnNeurons(nNeurons);
   this.setLabel(label);
   this.setWeightsToNextLayer(new float[nNeurons][nNeuronsNxtLyr]);
   if (!label.equals(LayerLabel.HIDDEN)) {
     this.setNeuronSpikeTimes(new SpikeTimes[nNeurons]);
   }
   this.setnWeights(nNeurons * nNeuronsNxtLyr);
 }