0
$\begingroup$

This is a major confusion for me - I've always thought filters (those small sliding windows size 3x3 or 5x5) are strictly 2D, this among other is specified in Caffe API:

kernel_size / kernel_h / kernel_w. The filter dimensions, given by kernel_size for square filters or kernel_h and kernel_w for rectangular filters

Now, I've never been 100% clear on what these convolutions mean (taken from Matt Zeiler's article (Visualizing and Understanding Convolutional Networks) and how they were obtained: enter image description here

After searching it turned out that filters can be 3D?? How does it work then? I found a bit of information on CS 231n course, but it's not explained in detail anywhere.

$\endgroup$
1
$\begingroup$

The diagram below Example 2 in this CS231 lecture is a good visualization of how filters work: http://cs231n.github.io/convolutional-networks/. Since each layer of a ConvNet has a depth corresponding to the number of filters (in an input RGB image, for example, the depth of the input layer would be 3), each filter of size $k\times k$ applied to a layer of delth $d$ slides over a volume of $k\times k\times d$ (note that the filter stays at a constant depth).

| improve this answer | |
$\endgroup$
  • $\begingroup$ but doesn't this mean that for a layer size nxnx3 we will have 3 different filters kxk each? $\endgroup$ – Alex Mar 30 '17 at 14:27
  • $\begingroup$ The number of filters is the depth $d'$ of your output layer, while the depth of each of those filters is the depth $d$ of your input layer $\endgroup$ – liangjy Mar 30 '17 at 15:30
  • $\begingroup$ but then why doesn't caffe implement them (here's from API): see the excerpt from the API $\endgroup$ – Alex Mar 31 '17 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.