Question in week 4 3D Convolution

Hi! In the lecture, Mr. Andrew had an example of 3D convolution: 3D volume 14x14x14x1 * 3D filter 5x5x5x1, 16 filters will provide a result of 10x10x10x16. Can somebody please explain why it gives 10x10x10? I know that 16 is the number of filters—many thanks for considering my request.

1 Like

If you apply the formula you subtract 5 from the 14 and add 1. You get 10.
So, the fact that it is 3D means that you get 10 x 10 x 10 by 16 (the number of filters).
Convolution can be 1D, 2D or 3D.


The formula for calculating the output dimension of a convolution is:

n_{out} = \displaystyle \lfloor \frac {n_{in} + 2p - f}{s} \rfloor + 1

As lukmanaj says, it works the same regardless of whether it’s a 1d, 2d or 3d convolution. That formula is applied in each dimension.

The values there are p for padding, s for stride and f for the filter size. So applying the numbers in your specific example:

n_{out} = \displaystyle \lfloor \frac {14 + 2*0 - 5}{1} \rfloor + 1 = 14 - 5 + 1 = 10


Thank you very much!

Thanks, Mr Pauilnpaloalto! Well-explained and easy to understand!