What is CNN
What is CNN
Convolutional Layer
These filters are small grids that slide over the input image to
perform element-wise multiplications and additions.
Each filter extracts specific features from the input data, such as
edges, textures, or more complex patterns.
Pooling Layer
Pooling layers reduce the spatial dimensions of the feature maps
while retaining the most important information.
This helps in reducing computation and making the model
translation invariant.
Max-pooling and average-pooling are common pooling techniques.
Max-pooling, for example, selects the maximum value within a small
region of the feature map, reducing the size and introducing
translational invariance.
Pooling helps reduce the computational complexity of the network
and makes the model more robust to small shifts in the input data.
Activation Layer
Dropout Layer
Dropout is a regularization technique used to prevent overfitting.
During training, a fraction of randomly selected neurons (typically
set as a hyperparameter) is temporarily “dropped out” or ignored.
It prevents the network from relying too heavily on specific neurons
and features.
Fully Connected Layer (Dense Layer)
The Fully Connected (FC) layer consists of the weights and biases
along with the neurons
These layers connect every neuron in one layer to every neuron in
the next layer.
They are typically used in the final layers of the CNN for
classification or regression tasks.
This is usually placed before the output layer and reduces human
supervision.
Flatten Layer: Before the fully connected layers, the feature maps are
typically flattened into a one-dimensional vector. This is done to match the
dimensionality between the convolutional/pooling layers and the fully
connected layers.
Input Layer: This layer represents the raw input data, typically images.
Each neuron in this layer corresponds to a pixel in the input image.
Output Layer: The final layer in a CNN produces the output. The number
of neurons in this layer depends on the specific task, e.g., one neuron for
binary classification or several neurons for multi-class classification.
These layers are typically stacked sequentially to form the architecture of
the CNN.