How does a Convolutional Neural Network (CNN) work?
Instruction: Briefly describe the architecture and functionality of CNNs.
Updated
Example answer
A convolutional neural network applies learned filters over local regions of a grid, sharing each filter's weights across positions. Nonlinear activations between layers make the resulting mapping more expressive than a stack of affine operations alone. Successive layers can combine information over a larger receptive field, depending on kernel sizes, strides and other operations.
A simple image classifier may use convolution, activation, downsampling and a final prediction head. A segmentation model needs spatially organized outputs instead. Pooling, fully connected layers and normalization are common choices, not mandatory components of every CNN. One-dimensional convolutions can also process signals.
Training adjusts the filters to the objective. Some early filters resemble edges, but the network is not guaranteed to learn edges in layer one, shapes in layer two and objects afterward. Pooling or striding can remove useful small details as well as reduce computation; they do not automatically select the most important information.
Input handling still matters. Follow the model's declared size, channel, range and normalization requirements, and keep training and serving transformations consistent. Compare held-out task quality and relevant failure slices with runtime and memory on the target workload. A learned feature extractor reduces some manual feature engineering; it does not remove data-quality or evaluation work.
Sources: PyTorch convolution, TorchVision model preprocessing.
Related Questions
-
easy
-
easy
-
hard
-
hard
-
hard
-
hard