I have one question regarding CNNs. If we take a single convolutional layer it can have multiple filters right? Are these filters all the same? Is a single layer made only to detect one feature? I am a bit confused of the working of convolutional layer.
-
See: https://datascience.stackexchange.com/questions/15903/why-do-convolutional-neural-networks-work – Nicolas Martin May 31 '22 at 12:02
2 Answers
A single convolutional layer has multiple filters and each one is different from the others. Therefore, a single convolutional layer can detect multiple features.

- 26,410
- 1
- 46
- 76
Usually, the expected input to a 2D convolutional layer is an image of size (width, height, channels).
A filter is applied to each channel of this input image separately and the result is one 2d matrix, for each channel. These 2d matrices are summed so that for one filter applied to your input, you get one 2d matrix.
The formulation of a convolutional layer allows using several filters, which are applied independently to each other. In practical, this means that you can parallelize the computations, and simply return $N$ 2d-matrices, where $N$ is the number of filters of your 2d-convolutional layer.
I think this article can give you a better intuition of how convolutional layers work. http://colah.github.io/posts/2014-07-Conv-Nets-Modular/ The figure you see here http://colah.github.io/posts/2014-07-Conv-Nets-Modular/img/KSH-filters.png in the above article is a visualization of all filters in one convolutional layer.

- 1,083
- 7
- 10