I couldn't find the right formula to compute the number of MACs in one Convolutional layer in a CNN. I tried this formula from Quora
[((H-K+S) /S) *((W-L+S)/S)) *C*M*N]
Where : HW size of input feature map; KL size of filter S stride C channels of the input M Output feature map N number of input feature map
I took an example : 1 input image 5x5x1 1 filter 3x3x1 Then I did a naïve calculation, I obtained 81 MACs. But when I used the above mentioned formula ai obtained 9.
I think that there is something that I didn't understand.
Thanks in advance