= Neural network feature map
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.<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]{ref}
For an own example, use the single-channel grid
$$
X=\begin{pmatrix}1&2&3\\4&5&6\\7&8&9\end{pmatrix}.
$$
Apply a two-by-two local averaging filter without padding and with <convolution stride> one. Its output map is
$$
A=\frac14\begin{pmatrix}1+2+4+5&2+3+5+6\\4+5+7+8&5+6+8+9\end{pmatrix}
=\begin{pmatrix}3&4\\6&7\end{pmatrix}.
$$
A second filter subtracting each patch's left column from its right column gives
$$
D=\begin{pmatrix}2&2\\2&2\end{pmatrix}.
$$
For example, its upper-left response is $(2+5)-(1+4)=2$. The two maps describe different local properties of the same input.
Stacking $A$ and $D$ gives an output with two <neural network channels>, each on a two-by-two grid: $2\times2\times2$ 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.
Back to article page