What is Convolutional neural network (CNN)?
A neural network built mainly from convolutional layers, which slide small filters (kernels) over the input and compute sums of products, stacked with pooling layers and others. Because the same filter is reused over the whole input, it has far fewer parameters than fully connected layers and extracts local features such as edges and textures in an image regardless of their position. It is used for image recognition, object detection, audio processing and more.
Japanese name: 畳み込みニューラルネットワーク(CNN)
Convolutional neural network (CNN) appears in 2 practice questions across 2 topics, including AI Hardware & Software Stack, Machine Learning Basics.
Field: Machine Learning Basics
Computation in a convolutional layer
A convolutional layer slides, for example, a 3×3 filter from the top left of the image at a fixed step (the stride), computing the sum of products of the overlapping pixels and the filter weights to build a feature map. The output size is (N + 2P − F) ÷ S + 1 for input size N, filter size F, padding P and stride S. Each layer uses several filters, each extracting a different feature such as vertical edges, horizontal edges or color changes. Deeper layers respond to larger, more complex features such as eyes or wheels.
FAQ
Is the computation in a convolutional layer the same as mathematical convolution?
Most frameworks call convolution what is strictly cross-correlation, a sum of products taken without flipping the filter. Because the filter weights are learned, whether the filter is flipped makes no difference to the model's performance.
Can CNNs be used for things other than images?
Yes. One-dimensional convolutions are used for audio waveforms and time-series data, and three-dimensional convolutions for video and volumetric medical images. They suit data arranged on a grid, in which neighboring values are related.