Convolution Neural Network
Convolution Neural Network
Stride:
In CNNs, stride refers to the step size with which the filter (kernel) moves
across the input image or feature map during convolution or pooling
operations.
Padding refers to adding extra pixels (usually zeros) around the border of the
input image or feature map before applying convolution or pooling operations.
Without padding, the size of the output feature map decreases after every
convolution operation.
→ Padding helps preserve the original input size.
● Reduce computation
● Control overfitting
Types of Pooling
Max Pooling
→ Selects the maximum value from the pooling window.
→ Retains prominent or strong features and removes less important
information.
→ Most commonly used pooling type in CNNs.
Average Pooling
→ Computes the average of all values within the pooling window.
→ Provides a smooth representation of features by reducing noise and
details equally.
Min Pooling
→ Selects the minimum value from the pooling window.
→ Rarely used but helpful in defect detection or applications where the
smallest value is important.
Flattening:
Flattening is the process of converting a multi-dimensional feature map
(output of convolution and pooling layers) into a one-dimensional vector.
Building Blocks of Convolutional Neural Networks (CNNs):
1. Input Layer
● Accepts raw image data.
2. Convolutional Layer
● Core layer that extracts features like edges, textures, shapes.
Benefits:
● Faster training
Types of Pooling:
● Global Pooling → Pool entire feature map into 1 value per channel
5. Flattening Layer
● Converts 2D/3D feature maps into 1D vector.