Deep Learning: Convolutional Neural Networks

Allan Handan
bawilabs
Published in
3 min readApr 11, 2018

In this publication, we will continue the Introduction to Deep Learning and Deep Learning: Word2Vec and Embedding, talking about the concepts behind Convolutional Neural Networks.

Convolutional Neural Networks (CNN)

It is an artificial neural network where the neurons are represented by filters (matrices or weight tensors) present in Convolutional Layers (CL), widely used in the classification and identification of patterns in images or texts.

CNN — Parameters

  • Filters: Represents the amount of filters in a CL.
  • Kernel Size: Defines the dimensions of the filters.
  • Stride: Sets the size of the filter shift step.
  • Padding: defines whether or not there is entry zeroing, influencing the output dimensions:
  • Same With filling.
  • Valid: Not filled out.

CNN — Process — Depth of output

The convolution process generates a deepening of the network, so that the depth of the output is the depth of the input multiplied by the number of filters present in the convolution layer. For example, an RGB image has depth 3, when passing through a CL with 5 filters, an output with depth 15 will be generated.

CNN — Process — Output height/width

The width and height of the exit depends on the dimensions of the entrance, the padding and the strides used.

Below we have two figures with examples of convolution with the formula for the dimensions of the output.

Figure 1: Convolutional process example with padding=valid and strides=(1,1).

We can see in Figure 1 that even with a stride = (1,1), the output did not maintain the dimensions of the input.

Figure 2: Convolutional process example with padding=same and strides=(1,1).

In figure 2, we can see that the output has maintained the dimensions of the input, this runs due to filling with zeros.

CNN — Pooling Layer

Layer similar to Convolutional Layer, the difference is that instead of applying an array of weights, the Pooling Layer applies a maximum, minimum or average function.

Figure 3 shows an application of a max pooling.

Figure 3: Max pooling example.

With this it is possible to make their image classification models more efficient, being able to determine the most features present in them.

I hope this article helps you understand a few more concepts of Deep Learning!

--

--