# Convolutional Neural Network Theoretical Course (Course VIII)

July 17, 2020 2020-08-04 10:54## Convolutional Neural Network Theoretical Course (Course VIII)

##### Course Curriculum

- Welcome to Course VIII!
- Introduction to Convolutional Neural Networks
- The Convolution Operation
- Stride and Calculation of Output Size
- The Pooling Operation
- The Convolution/Pooling Operation for RGB images
- Padding an Image
- Building a Convolutional Neural Network
- Training a Convolutional Neural Network
- End of Course

### The Pooling Operation

The pooling operation is another fundamental operation of a Convolutional Neural Network. Thankfully, this operation can be understood much quicker since we already have a sound knowledge of the convolution operation.

In practice, two kinds of pooling operations are mostly used: max pooling and average pooling. We will illustrate both of these pooling operations in the sections below.

#### Max-pooling

The max-pooling operation takes in a tensor as an input and outputs the maximum element present in the tensor. This can be better understood using the following notation-based example:

Consider an image tensor with a dimension size of 4×4,

Taking a max-pooling of size 2×2 and stride of 2, the output tensor can be obtained as follows:

The final output tensor is then obtained as follows,

Let us understand this even clearly with the help of a numerical example.

Consider an image tensor with a dimension size of 4×4,

Taking a max-pooling of size 2×2 and stride of 2, the output tensor can be obtained as follows,

The final output tensor is then obtained as follows,

#### Average-pooling

The average-pooling operation takes in a tensor as an input and outputs the average of all the elements present in the tensor. This can be better understood using the following notation-based example:

Consider an image tensor with a dimension size of 4×4,

Taking a average-pooling of size 2×2 and stride of 2, the output tensor can be obtained as follows,

The final output tensor is then obtained as follows,

Let us understand this even clearly with the help of a numerical example.

Consider an image tensor with a dimension size of 4×4,

Taking a max-pooling of size 2×2 and stride of 2, the output tensor can be obtained as follows,

The final output tensor is then obtained as follows,

The pooling operation is usually performed after the convolution operation. Pooling is performed in order to further reduce the size of the input tensor by selecting only the important features from an image.