When adding a Conv2D layer, we pass in f or the kernel_size, which is the height and width of the filter. But are the actual filters 2D shapes of dimensions f x f, or are they 3D shapes of dimensions f x f x nc (nc representing the number of channels in the input shape)?

Thanks!

Hello harshitjain, and welcome to Discourse,

As I understand the documentation, the filters attribute is the number of channels while the kernel_size attribute is the height and width of the filter.

Thanks for your reply Christian. The filters attribute refers to the number of filters. I want to know if the filter itself is a two-dimensional f x f filter or a three-dimensional fxfxnc filter.

1 Like

I may not understand it well, but isn’t the number of filters precisely the dimension nc?