Filter size of a ConvNet

Hello everyone,

Talking about the filter in a convolution operation, I was wondering what happen if it is possible to have a non-squared matrix (height != width). If it not possible, can someone give the intuition behind this? And in case it is possible, how to set the value of the parameter f[l] (the filter size of layer l in a ConvNet)?

Thank you!

Yes, there is no requirement that the filters be square. Prof Ng mentions this in passing, but (if my memory serves) does not really go into any cases in which that would be useful. And all the examples we see throughout this course have square filters. But all the TF/Keras APIs support specifying the filter as either single value f (in which case you get a square filter) or as a 2-tuple (f1,f2) which gives you complete flexibility.

The same is true of strides: they can be different in the vertical and horizontal directions, but Prof Ng does not show us any examples in which that is the case.

1 Like

Thank you for sharing the light about this, Paul. This clarifies some of my doubts.