Solution (source code)

= Solution

A <multilayer perceptron> usually connects every input unit of a layer to every output unit. For $n$ inputs and $m$ outputs its dense affine layer has \b[$nm+m$ parameters], including biases. A convolutional layer instead applies small local filters with <weight sharing> across positions. A two-dimensional filter of size $k_h\times k_w$, with $C_{\rm in}$ input channels and $C_{\rm out}$ output channels, has \b[$k_hk_wC_{\rm in}C_{\rm out}+C_{\rm out}$ parameters]. The count does not increase with spatial height and width, although the activation storage and arithmetic do.

Local <receptive fields> and repeated layers capture increasingly extended patterns. <translation equivariance> follows from shared filters under compatible boundary conventions; pooling or global aggregation can help build invariance but a convolution alone is not generally translation-invariant. Flattening a large convolutional output into a dense head can reintroduce many parameters. For an unordered descriptor vector, a convolutional locality assumption must be justified rather than imposed merely because convolutional layers have fewer weights.