Pointwise convolution
ID: pointwise-convolution
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. New to topics? Read the docs here!