CNN: correlation between filter size and stride
I'm not sure if this fits your problem. But if you want to downsampling 8 times and avoid the problem of strides, you can set the padding to "same" in the Conv2D layers. It will apply the stride and padding with zeros evenly to the left/right or up/down of the input such that output has the same height/width dimension as the input.
Unet is a pretty popular network architecture, used in various computer vision tasks. Commonly, Unet encoder has downsampling layers that downsample by 2, which means the stride of the conv layer used will be 2 and filter sizes >3.
For a problem that I am trying, I want to perform downsampling 8 times ( by 2 each time). Instead of having 8 layers in the encoder, I thought I can have 4 layers that downsample by 4 each. For this, I dont think filter sizes like 3 or 5 make much sense- during the sliding, the filter will end up not covering certain pixels.
I would like to get some pointers on how I need to alter the filter size as I alter stride and vice-versa. Additionally, would it also make sense to reduce the number of filters if I increase filter size?
A pointer to the readers of this Q: I searched the internet for prior works that use stride 4, and found AlexNet. Its first conv layer has filters 11x11x96 and stride 4. So, I am encouraged to increase my filter size. :)