Loading…
Glossary term
A neural network that uses filters to detect local patterns, widely used for images.
A CNN slides small filters across an image. Each filter detects a local pattern such as an edge, and deeper layers combine those into textures, shapes and objects.
Because the same filter is reused across the whole image, CNNs need far fewer parameters than a fully connected network for images.
A convolution layer in PyTorch
import torch.nn as nn
conv = nn.Conv2d(in_channels=3, out_channels=16, kernel_size=3, padding=1)
# 16 filters, each 3x3, slid across an RGB imageCNNs drove the breakthroughs in image recognition and are still used widely in vision systems, though transformers now compete with them.