What is the purpose of a kernel in a Convolutional Neural Network (CNN)?
A kernel (or filter) in a CNN is a small matrix of learnable weights that slides across the input (an image, feature map, or intermediate activation) computing a dot product at each spatial position --- the convolution operation. Each kernel is trained to detect a specific local pattern: early-layer kernels typically learn to detect low-level features like edges and color gradients, while kernels in deeper layers combine these into detectors for more complex, higher-level patterns (textures, object parts, and eventually whole-object representations as receptive fields grow with depth). A convolutional layer typically applies many kernels in parallel, each producing its own output channel, collectively forming the layer's feature map.
The other options describe separate CNN components with distinct responsibilities: the loss function (B) is computed at the network's output based on the difference between predictions and ground truth, entirely separate from the kernel's role in feature extraction. Classification (C) is typically performed by fully connected (dense) layers --- often with a softmax activation --- placed after the convolutional feature-extraction stack, not by the kernels themselves. Normalization (D) is handled by dedicated layers such as batch normalization or layer normalization, inserted between convolutional layers to stabilize activations, again a separate mechanism from the convolution operation itself.