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.
Effective convolution kernel size 2026-11-05
The effective convolution kernel size is the bounding extent of a dilated convolution kernel along a spatial axis. For sampled coefficients with convolution dilation , their offsets are . The first-to-last displacement is , so including the first position givesThis extent determines the kernel footprint used in spatial shape calculations; it is not generally the number of coefficients.[ref]
For a two-dimensional example, choose a sampled kernel shape with dilation . Its row offsets are and column offsets are . The bounding shape is thereforeThere are six sampled spatial positions inside a twenty-position bounding box. Fourteen intermediate positions are absent from the sampling pattern.
With three input neural network channels and four output channels, ordinary dense channel connectivity usesweights and optionally four biases, giving parameters. A general dense five-by-four kernel with the same channel counts would have weights. Representing the dilated operation that way would require of them to be fixed zeros, rather than independently learned parameters.[ref]
For an unpadded -by- input and convolution stride one, the output grid isMore generally, for one axis with symmetric zero padding and stride ,when the padded input accommodates the footprint. The floor function counts admissible filter origins.[ref]
The effective size is a geometric quantity for one layer. The complete neural network receptive field through several layers additionally depends on their kernels, strides and connections. Likewise, changing stride moves the spacing of origins; changing dilation changes the footprint at each origin. Keeping bounding extent, sampled-position count and learned-parameter count separate avoids confusing three different sizes.
Neural network channel 2026-11-05
A neural network channel indexes a component or response type at each position of a neural network's data grid. In a two-dimensional convolutional neural network, the channel axis is distinct from the two spatial axes. For example, an image represented with the RGB color model has red, green and blue input channels, while an intermediate neural network feature map can have many learned response channels.[ref]
Conv2d in the PyTorch documentation. Opening equation, input/output channel counts and spatial dimensions
The arrangement of axes must be stated. In the documented convention , counts examples, channels, rows and columns. Thus two three-channel images, each four pixels high and five pixels wide, have shape and containscalar entries. Changing the number of examples does not change the number of channels in each example.[ref]
Conv2d in the PyTorch documentation. Shape, batched input convention
A dense convolutional layer can mix all input channels into each output channel. For the preceding input, use eight output channels, three-by-three filters, convolution stride one and no padding. The output shape iswith scalar entries. Its eight filters use weights, plus eight biases if enabled, giving parameters. The leading example count does not multiply this parameter count: the same weights process each example.[ref]
Conv2d in the PyTorch documentation. Opening channel-summation equation; Shape; Variables, dense weight and bias dimensions with groups=1
The eight output channels are not eight new primary colors. Their values are determined by learned combinations of the preceding channels and spatial neighborhoods. Individual channels can be useful for interpretation, but a channel's index does not by itself identify a human-named feature or make its response a probability.
A pointwise convolution makes the channel operation especially clear: at every spatial point it maps one channel vector to another using the same matrix of weights. By changing that matrix, it can reduce or increase the channel count while preserving the grid dimensions under unit-stride, unpadded conditions. Keeping channel, spatial and example axes separate prevents both shape errors and misleading interpretations.
Neural network feature map 2026-11-05
A neural network feature map records a network's responses across positions in its input or an intermediate grid. In a convolutional neural network, one common convention calls each output neural network channel a feature map; several such maps are stacked to form the layer's output. State whether the phrase denotes one channel or the collection, since both usages occur.[ref]
Deep Learning by Ian Goodfellow and others. Chapter 9, §9.1, convolution input/kernel/output terminology; §9.5, multiple channels
[ref]Conv2d in the PyTorch documentation. Opening equation and Shape, output-channel and spatial dimensions
For an own example, use the single-channel gridApply a two-by-two local averaging filter without padding and with convolution stride one. Its output map isA second filter subtracting each patch's left column from its right column givesFor example, its upper-left response is . The two maps describe different local properties of the same input.
Stacking and gives an output with two neural network channels, each on a two-by-two grid: values in channel-height-width order. The channel index identifies which response rule was used; it is distinct from either spatial index. An activation function can then transform those values before another convolutional layer processes them.
The hand-chosen filters make the example interpretable, but learned maps need not correspond to a human-named object or property. Their entries are numerical responses determined jointly by the input, weights and preceding computation. A neural network feature map also need not have the same spatial dimensions as its input: patch size, convolution stride and padding affect the grid. Keeping the channel and spatial axes separate helps interpret both the computation and its dimensions.
Neural network receptive field 2026-11-05
A neural network receptive field describes which input positions can influence a specified output unit through the network's computational connections. A local convolutional layer uses only a small input region for each output, but successive layers can combine information from a larger region. This dependence is relative to a chosen input layer; an immediate previous-layer neighborhood and the corresponding original-input region have different sizes.[ref]
Deep Learning by Ian Goodfellow and others. Chapter 9, §9.2, sparse interactions and Figure 9.4, growth of receptive fields in deeper layers
For an own one-dimensional example, use two kernel-size-three convolutional layers, with convolution stride one, no padding and no convolution dilation. Intermediate units , and depend on input sets , and respectively. The first output of the second layer combines these three units, so its possible original-input dependency isTwo size-three filters therefore give a size-five receptive region, not size nine.
A recurrence tracks the geometry of an undilated serial network. Let be the span of the receptive region in original-input positions and the original-input index separation between adjacent layer- outputs. With kernel size , stride and initial values ,The last contributing previous-layer unit lies input positions beyond the first, which proves the span increment. This derivation assumes the stated local serial connectivity, no padding and no dilation.
If the first size-three layer instead has stride two, then and . A second size-three, stride-one layer has : its three input supports are , and . Their union reaches from zero through six. For other sampling choices, a span can include gaps, so span and number of contributing positions need not agree.
This is a structural dependency calculation. Zero weights or the current behavior of an activation function can suppress an influence that the architecture permits; the calculation does not measure how strongly each position affects a particular output. A unit-stride pointwise convolution mixes neural network channels at the same location and does not enlarge this spatial region. The distinction helps explain why many channels alone do not guarantee access to distant input context.
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.