Subsampling operations

As stated earlier, a neuron located in a given layer is connected to the outputs of the neurons in the previous layer. Now, in order for a layer to have the same height and width as the previous layer, it is common to add zeros around the inputs, as shown in the diagram. This is called SAME or zero padding.

The term SAME means that the output feature map has the same spatial dimensions as the input feature map. Zero padding is introduced to make the shapes match as needed, equally on every side of the input map. On the other hand, VALID means no padding and only drops the right-most columns (or bottom-most rows):

Figure 5: SAME versus VALID padding with CNN

Now we have the minimum theoretical knowledge about CNNs and their architectures, it's time to do some hands-on work and create convolutional, pooling, and subsampling operations using Deeplearning4j (aka. DL4j), which is one of the first commercial-grade distributed open source deep-learning libraries written for Java and Scala. It also provides integrated support for Hadoop and Spark. DL4j is designed to be used in business environments on distributed GPUs and CPUs.

..................Content has been hidden....................

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