educative.io

Convolution Principle

Could you please help me in understanding i.e., why the output is scalar? I have added second image as an example
Correct me in case I’m wrong ?


Course: Introduction to Deep Learning & Neural Networks - Learn Interactively
Lesson: The Principles of the Convolution - Introduction to Deep Learning & Neural Networks

Hi @Vikrant !!
The output of the convolution operation is a scalar value at each step when the dot product between the input matrix and the kernel matrix is calculated for a particular position. This happens due to the nature of the convolution operation, which essentially involves multiplying the corresponding elements of the input matrix and the kernel matrix and then summing up these products.

When the kernel slides across the input matrix, the dot product is calculated at each position, resulting in a single scalar value. This scalar represents the level of similarity or correlation between the specific local patch of the input matrix and the pattern encoded in the kernel. Therefore, for each position of the kernel over the input matrix, a single scalar value is produced, which eventually forms the feature map.

In the context of image processing, this scalar output represents the activation level or response of the specific filter or feature detector to a localized pattern or feature within the image. These scalar outputs collectively make up the feature map, which can then be used as an input for subsequent layers in the neural network, enabling the network to learn hierarchical representations of the input data.
I hope it helps. Happy Learning :blush: