I was hoping someone could just confirm some intuition about how convolutions work in convolutional neural networks. I have seen all of the tutorials on applying convolutional filters on an image, but most of those tutorials focus on one channel images, like a 128 x 128 x 1 image. I wanted to clarify what happens when we apply a convolutional filter to RGB 3 channel images.
Now this is not a unique question, I think a lot of people ask this question as well. It is just that there seem to be so many answers out there, each with their own variations, that it is hard to find a consistent answer. I included a post below that seems to comport with what my own intuition, but I was hoping one of the experts on SE could help validate the layer arithmetic, to make sure my intuition was not off.
How is the depth of the input related to the depth of the output of a convolutional layer?
Consider an Alexnet network with 5 convolutional layers and 3 fully connected layers. I borrowed the network from this post. Now, say the input is 227 x 227, and the filter is specified as 11 x 11 x 96 with stride 4. That means there are 96 filters each with dimensions 11x11x3, right? So there are a total of 363 parameters per filter--excluding the bias term-- and there are 96 of these filters to learn. So the 363*96 = 34848 filter values are learned just like the weights in the fully connected layers right?
My second question deals with the next convolutional network layer. In the next layer I will have an image that is 55 x 55 x 96 image. In this case, would the filter be 5x5x96--since there are now 96 feature maps on the image? So that means that each individual filter would need to learn 5x5x96 = 2400 filter values (weights), and that across all 256 filters this would mean 614,400 filter values?
I just wanted to make sure that I was understanding exactly what is being learned at each level.