Convolutional layer 2026-11-05
A convolutional layer applies shared local filters across an input grid to produce output neural network channels. Each filter combines the input channels and nearby positions, with the same learned weights reused at different output positions. This weight sharing distinguishes it from assigning unrelated weights to every grid location.[ref]
Deep Learning by Ian Goodfellow and others. Chapter 9, §9.2, sparse interactions and parameter sharing
For real-valued input , dense channel connectivity, no padding and convolution stride one, write the affine output asHere selects the output channel, an input channel, the filter weights and a neural network bias. The spatial indices stay in range. This unflipped-filter formula is the cross-correlation convention used by the Conv2d implementation, despite its convolution name. Mathematical discrete convolution reverses the kernel's displacement indices; state the convention when comparing formulas.[ref]
Conv2d in the PyTorch documentation. Opening equation, valid two-dimensional cross-correlation and channel summation
For one input channel, takeThe first patch gives . Applying the same weights everywhere givesA following rectified linear unit produces . The affine filter operation and the subsequent activation function are separate steps, although an architectural description sometimes groups them together.
For an input grid in this unpadded, unit-stride case, the output dimensions are . There are weights for each output channel and one bias, so the total parameter count isIt does not grow with or ; the number of filter applications does.[ref]
The neural network receptive field identifies which input positions can influence an output. Local filters restrict that dependency, while successive layers can combine information from a larger region. Convolution stride and zero padding alter the spatial sampling and boundary behavior; the explicit formulas above assume neither subsampling nor padding.
Pointwise convolution 2026-11-05
A pointwise convolution uses a spatial kernel of size one to combine neural network channels independently at each spatial position. For a two-dimensional input this is a one-by-one convolutional layer. In the ordinary dense-channel, unit-stride case, the same affine map acts on the channel vector at every grid point.[ref]
Conv2d in the PyTorch documentation. Opening equation and kernel_size/stride parameters, specialized to kernel size one and groups=1
Let be the channel vector at position . With weight matrix and neural network bias vector , the output isThis is matrix multiplication across channels, not an average of neighboring spatial positions. The same and are reused throughout the grid.
For an example without biases, takeAt a point with input the output is . At another point with input it is . A three-channel neural network feature map has become a two-channel map without mixing the two positions.
There are weights, plus optional biases. Thus three input and two output channels require six weights, or eight parameters including biases. A dense three-by-three filter with the same channel counts requires weights, or fifty-six parameters with biases. This comparison counts parameters for the stated connectivity; it does not claim that the two layers compute equivalent functions.
Channel reduction can make a later spatial convolutional layer cheaper. The original Inception uses one-by-one reductions before some larger filters. A pointwise operation can also increase the channel count; size one refers to its spatial footprint, not to the number of channels.[ref]
Going Deeper with Convolutions by Christian Szegedy and others. §4 and Fig. 2, one-by-one dimension-reduction branches
With no intervening spatial operation, pointwise layers and pointwise activation functions alone do not enlarge the spatial neural network receptive field.