# What's the notation of number of filters?

I know this is a very basic question… but I want to double-check.
If I have a filter 3x3x10, this means, n_h(height)=3, n_w(width)=3, n_c(number of channel) = 10. this n_c must be the same as the input. If the input is a RGB picture (3 channel), then here must be 3 not 10. Again, this 10 is not #filters, just channels.

Now, I want to have 20 different filters of this 3x3x10. How do I write it down ? 3x3x10 20 like this?

Thank you!

Hi @sunson29
here n_c is number of channels of only one filter must be equal nc[L-1](number of channels of input image here = 3) …but 10 is number of filters(nc[L]) we want to use on the image we have(not equal number of channels)…so there are a difference between number of channels and number of filter …this image I think will also help you

yes if you want to use 20 different filters on the result of previous layer you want to use filter with shape(nH,nW,10) (10 is equal nc[L-1] = the depth of filter )and to use number of filters = 20
Thanks,
Abdelrahman

1 Like

Thank you for such a detail reply.
Abdelrahman, but my question is more about notation. Let’s say, this 2 filters 3x3x3 in your picture, what’s the notation or how do you write it down? Like 3x3x3 2 ?

Hi

in mathematical notations nc[L] = number of filter = 2 ,
nc[L-1] = is depth of the input photo or it is number of channels of previous input layer = 3

but when we write the code there are two ways ,first you can do it from scratch like the first assignment in DL course 4 or you can implement it using libraries like tensorflow or pytorch which facilitate how to implement CNN like last assignments in DL4