Class Layer


  • public class Layer
    extends java.lang.Object
    Author:
    vdang This class implements layers of neurons in neural networks.
    • Field Detail

      • neurons

        protected java.util.List<Neuron> neurons
    • Constructor Detail

      • Layer

        public Layer​(int size)
      • Layer

        public Layer​(int size,
                     int nType)
        Parameters:
        size -
        nType - 0 for pair; 1 for list.
    • Method Detail

      • get

        public Neuron get​(int k)
      • size

        public int size()
      • computeOutput

        public void computeOutput​(int i)
        Have all neurons in this layer compute its output
      • computeOutput

        public void computeOutput()
      • clearOutputs

        public void clearOutputs()
      • computeDelta

        public void computeDelta​(PropParameter param)
        [Only for output layers] Compute delta for all neurons in the this (output) layer
        Parameters:
        targetValues -
      • updateDelta

        public void updateDelta​(PropParameter param)
        Update delta from neurons in the previous layers
      • updateWeight

        public void updateWeight​(PropParameter param)