How it works...

In step 1, ImagePreProcessingScaler normalizes the pixels in a specified range of values (0, 1) . We will use this normalizer once we create iterators for the data. 

In step 2, we have added hyperparameters such as an L2 regularization coefficient, a gradient normalization strategy, a gradient update algorithm, and an activation function globally (applicable for all layers).

In step 3, ConvolutionLayer requires you to mention the kernel dimensions (11*11 for the previous code). A kernel acts as a feature detector in the context of a CNN:

  • stride: Directs the space between each sample in an operation on a pixel grid.
  • channels: The number of input neurons. We mention the number of color channels here (RGB: 3).
  • OutGoingConnectionCount: The number of output neurons.

In step 4, SubsamplingLayer is a downsampling layer to reduce the amount of data to be transmitted or stored, and, at the same time, keep the significant features intact. Max pooling is the most commonly used sampling method. ConvolutionLayer is always followed by SubsamplingLayer.

Efficiency is a challenging task in the case of a CNN. It requires a lot of images, along with transformations, to train better. In step 4, LocalResponseNormalization improves the generalization power of a CNN. It performs a normalization operation right before performing ReLU activation

We add this as a separate layer placed between a convolution layer and a subsampling layer:

  • ConvolutionLayer is similar to a feed forward layer, but for performing two-dimensional convolution on images.
  • SubsamplingLayer is required for pooling/downsampling in CNNs.
  • ConvolutionLayer and SubsamplingLayer together form the input layers for a CNN and extract abstract features from images and pass them to the hidden layers for further processing.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset