Contents
How do you select the number of filters in convolutional neural network?
Tips
- Use smaller filters like 3×3 or 5×5 with more convolution layer.
- Convolution filter with small stride works better.
- If GPU memory is not large enough, sacrifice the first layer with a larger filter like 7×7 with stride 2.
- Use padding fill with 0.
- Use filter size 2, stride size 2 for the maximum pooling if needed.
Why do we increase number of filters in CNN?
The higher the number of filters, the higher the number of abstractions that your Network is able to extract from image data. The reason why the number of filters is generally ascending is that at the input layer the Network receives raw pixel data. Raw data are always noisy, and this is especially true for image data.
How does CNN calculate number of filters?
To calculate it, we have to start with the size of the input image and calculate the size of each convolutional layer. In the simple case, the size of the output CNN layer is calculated as “input_size-(filter_size-1)”. For example, if the input image_size is (50,50) and filter is (3,3) then (50-(3–1)) = 48.
How to choose the number of filters in Each convolutional layer?
But you can get inspiration from VGG16 for example. It double the number of filters between each conv layers. For the kernel size, I usually keep 3×3 or 5×5. But, you can also take a look at Inception by Google. They use varying kernel size, then concat them.
How to choose the number of convolution layers in CNN?
The number of layers and the number of nodes in each layer are model hyperparameters that you must specify and learn. You must discover the answer using a robust test harness and controlled experiments.
Why do we increase the number of filters in CNN?
That’s why we increase the filter size in subsequent layers to capture as many combinations as possible. The higher the number of filters, the higher the number of abstractions that your Network is able to extract from image data.
Is there a hard rule about the number of filters?
I know that there is no hard rule about the number of filters, but from your experience/ papers you have read, etc. is there an intuition/observation about number of filters used? For instance (I’m just making this up as example):