I was recently asked at an interview to calculate the number of parameters needed, for a convolutional layer. I am deeply ashamed to admit I didn't know how to do that, even though I've been working and using CNN for years now. Is there a formula which will give me the number of parameters needed? Suppose my kernel is 3 x 3, no padding, no stride, and the input is 24 x 24 x 3.