Class ConvolutionalLayer

  • All Implemented Interfaces:

    public final class ConvolutionalLayer
    extends AbstractLayer
    Convolutional layer performs image convolution operation on outputs of a previous layer using filters. This filtering operation is similar like applying image filters in photoshop, but this filters can also be trained to learn image features of interest. Layer include parameters: filter's width, heigh Number of filters / depth Step when applying filters : stride Padding, which is an image border to keep the size of image and avoid information loss padding Stride defaults to 1
    Zoran Sevarac
    See Also:
    Serialized Form
    • Constructor Detail

      • ConvolutionalLayer

        public ConvolutionalLayer​(int filterWidth,
                                  int filterHeight,
                                  int channels)
        Create a new instance of convolutional layer with specified filter. dimensions, default padding (filter-1)/2, default stride stride value 1, and specified number of channels.
        filterWidth -
        filterHeight -
        channels -
    • Method Detail

      • init

        public void init()
        Init dimensions, create matrices, filters, weights, biases and all internal structures etc. Assumes that prevLayer is set in network builder
        Specified by:
        init in class AbstractLayer
      • forward

        public void forward()
        Forward pass for convolutional layer. Performs convolution operation on output from previous layer using filters in this layer, on all channels. Each channel from prev layer has its own filter (3D filter), and every channel in this layer has its 3D filter used to scan all channels in prev layer. Previous layers can be: Input, MaxPooling or Convolutional. For more about convolution see
        Specified by:
        forward in interface Layer
        Specified by:
        forward in class AbstractLayer
      • backward

        public void backward()
        Backward pass for convolutional layer tweaks the weights in filters. Next layer can be: FC, MaxPooling, Conv, (output same as FC), 1D or 3D Prev layer can: Input, pool, conv, all 2D or 3D - all can be as generalized 3D U 2 koraka: 1. povuci delte iz sledeceg lejera, i izracunaj tezinsku sumu delta za sve neurone/outpute u ovom sloju 2. izracunaj promene tezina za sve veze iz prethodnog lejera za svaki neuron/output u ovom sloju
        Specified by:
        backward in interface Layer
        Specified by:
        backward in class AbstractLayer
      • setFilters

        public void setFilters​(java.lang.String filtersStr)
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object