Computer Vision: What is the parameter size of a convolutional layer?

The focus of this article

The parameter quantity of the convolution kernel is an important concept in the convolutional neural network, which determines the complexity and calculation amount of the network. In deep learning, convolution operation is a commonly used operation for extracting features in data such as images and speech. The advantage of the convolutional neural network lies in the sparse connection and weight sharing, which makes the parameters of the convolution kernel much less than the traditional neural network.

example

Assuming that a single convolutional layer has 10 filters (convolution kernels), and the dimension of the filter is 3*3*3, how many parameters does this layer have?

The filters are 3×3×3, so each filter has 27 parameters. Then add a deviation, represented by parameter b, and now the number of parameters has increased to 28. And now we have 10 filters, which add up to 28×10, or 280 parameters.

The parameters of the fully connected neural network are determined by the upper layer and the current layer, while the weight parameters of the convolutional neural network are determined by the width, height, channel and number of filters of the filter.

Please note that no matter how big the input image is, whether it is 1000×1000 or 5000×5000, the parameters of the convolutional layer are always 280. Use these 10 filters to extract features such as vertical edges, horizontal edges and other features. Even though these images are large, there are few parameters, which is a feature of convolutional neural networks called "avoiding overfitting".

formulaic summary

Taking a two-dimensional convolution kernel as an example, assuming that the size of the convolution kernel is K×K, the depth is D, and the number of channels of the input data is C, then the parameter quantity of the convolution kernel can be calculated as:

<

Guess you like

Origin blog.csdn.net/huanfeng_AI/article/details/132032273