I have long been confused about how to count the number of parameters in CNN, but thanks to lots of examples in this video, I have finally understood it! Thank you!
Very good explanation Sir... I searched many links but didn't find an appropriate video to calculate no.of channels.. this is the best video . Thanks a lot
The formula for output shape is: [(W-K+2P)/S]+1. Where: W is the shape of input image (10), K is the shape of kernel, p is the dimension of padding (0) and is the measure of stride (1). Result:10-3+1=8.
because its use 'valid' padding configuration. you can calculate output with formula output = ((n+2p-f)/s) + 1 with n=number of input=10, p=padding=0, f=filter=3, and s=stride=1 which we get output = (10+0-3)/1 +1 = 8
That was wonderful explanation. Thank you. But What if the input image's width and height are different? Like 228x284. What happens to the output's width and height?
Convolution2D (8, 3) implies that we are having 8 3x3 filters. My question is what kind filters they are, all same or all different. If filters are different who decides the filters?
they are different filters initially provided by the program (from keras package for example), and each of them has a particular ability to extract local features from the input(like edge detection, cornor detection...)
number of parameters are independent of input shape, they only calculated with the filter size and number of filters and additive bias to each filter. Input shape is useful while calculating output size, not the parametes.
For Convolution layer : Number of Params = (filter width × filter height × input channels + 1) × number of filters For Fully Connected layer: Number of Params= (current layer neurons c * previous layer neurons p) + c.
I have long been confused about how to count the number of parameters in CNN, but thanks to lots of examples in this video, I have finally understood it! Thank you!
Very good explanation Sir... I searched many links but didn't find an appropriate video to calculate no.of channels.. this is the best video . Thanks a lot
this is soooooooo gooood. Highly recommend to anyone who wants to understand the # of parameters in CNN
How 10x10 turns to 8x8, you should have explained. anyway i figured it out formula is output= n-f+1 while n is input and f is filter.
The formula for output shape is: [(W-K+2P)/S]+1. Where: W is the shape of input image (10), K is the shape of kernel, p is the dimension of padding (0) and is the measure of stride (1). Result:10-3+1=8.
@@TheMatteoAntonini Thanks Buddy...I was bit confused for the same value of 8. You made it clear ❣️
Good question. Thank you.
This video is amazing. I have been searching for explanation like this, and those fancy tutorial are pretty disappointing. Thank you Sir!
I can't undrestand,help me please.
Why when our input is 10x10 dimentional and then we apply one 3x3 filter our output becomes 8x8?
because its use 'valid' padding configuration. you can calculate output with formula output = ((n+2p-f)/s) + 1 with n=number of input=10, p=padding=0, f=filter=3, and s=stride=1 which we get output = (10+0-3)/1 +1 = 8
Finally solved all doubt , Crystal Clear
This was such a brilliant explanation. Thank you so much!!!!
Awesome sir, most wanted explanations with more samples.
Thank you very much. Now all doubts are clear.
great explanation
thank you. this is very informative and clear my doubts
Where does the number 8 come from in the first example?
Thank you for this masterpiece explanatory.
how weight is initialized in the 1d conv, if it is not initialized what is the default value.
awesome video.....10/10
Well explained
Amazing and detailed explanation
EXCELLENT SIR
Thank you! This video is helping me do revision!
That was wonderful explanation. Thank you. But What if the input image's width and height are different? Like 228x284. What happens to the output's width and height?
You should be able to resize it to like 150x150
you might get an output of size 226x282 ( n will be different for height and width, and asssume filter size 3x3 and stride=1)
sir you are awesome
Thank you so much!
Thank you
Is the example 4 incorrect? You have 3 by 3 filters with a depth of 5, should not that be (3*3*5+1)*8
Convolution2D (8, 3) implies that we are having 8 3x3 filters. My question is what kind filters they are, all same or all different. If filters are different who decides the filters?
they are different filters initially provided by the program (from keras package for example), and each of them has a particular ability to extract local features from the input(like edge detection, cornor detection...)
awesome!
Thank you Sir.
good video
Thank you!
Plz help me, why parameters is 128 and 25 in input shape 100,5 (example 4)
number of parameters are independent of input shape, they only calculated with the filter size and number of filters and additive bias to each filter. Input shape is useful while calculating output size, not the parametes.
For Convolution layer :
Number of Params = (filter width × filter height × input channels + 1) × number of filters
For Fully Connected layer:
Number of Params= (current layer neurons c * previous layer neurons p) + c.
Excellent! Thank you very much!
i understand, thank,
fitur extraction cnn, great
THank youu
Tnx
I love you
👍
La aayo hai
Thank You !