How to choose the number of filters in each Convol

2020-07-18 05:06发布

问题:

When building a convolutional neural network, how do you determine the number of filters used in each convolutional layer. 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):

  • use more/less filters as the network gets deeper.

  • use larger/smaller filter with large/small kernel size

  • If the object of interest in the image is large/small, use ...

回答1:

As you said, there are no hard rules for this.

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 3x3 or 5x5.

But, you can also take a look at Inception by Google. They use varying kernel size, then concat them. Very interesting.



回答2:

As far as I am concerned there is no foxed depth for the convolutional layers. Just several suggestions:

  1. In CS231 they mention using 3 x 3 or 5 x 5 filters with stride of 1 or 2 is a widely used practice.

  2. How many of them: Depends on the dataset. Also, consider using fine-tuning if the data is suitable.

  3. How the dataset will reflect the choice? A matter of experiment.

  4. What are the alternatives? Have a look at the Inception and ResNet papers for approaches which are close to the state of the art.