06 / 14 · Convolutional Networks
Convolution
Why a fully connected layer fails on images, the convolution as a sliding dot product with shared weights, channels, padding, stride and dilation with their sizes and costs, receptive fields, pooling, translation equivariance, 1×1 and transposed convolutions.
PyTorch and automatic differentiation · Neural networks · Linear algebra
On this page 10
The first section of the course made a network trainable: a loss computed stably, regularizers, initialization and normalization that keep signals at a usable scale, and optimizers that take good steps. Every network in it was fully connected and read an image as a flat vector of pixels, which works for digits and breaks down for photographs. This note introduces the layer that replaced it in vision: the convolution, which looks at small neighbourhoods and uses the same weights at every position. It covers the operation itself with a worked example, how channels, padding, stride and dilation set its shapes and costs, how far a unit of a deep stack can see, pooling, what translation equivariance means and where it breaks, and two variants used everywhere in the rest of the course, the and the transposed convolution.
Notation. An image or feature map is a tensor : channels, each an grid; is channel at row and column , indexed from 0. A layer outputs . Kernels are (square for simplicity; everything holds per dimension). is the stride, the padding and the dilation. A batch adds a leading dimension, which PyTorch writes as .
Baseline: a fully connected layer on pixels#
A fully connected layer treats the numbers of an image as an unordered vector and connects every output to every input. Two things go wrong.
The parameter count. A colour image has numbers. A layer that maps it to a feature map of the same size with 64 channels, outputs, needs weights, about 1.9 terabytes in 32-bit floats. The Machine Learning course makes the same count for a image; at photographic sizes the layer cannot even be stored.
No notion of position. A fully connected layer has a separate weight for every pixel. An edge detector learned in the top-left corner says nothing about an edge in the centre: the layer must learn it again, from examples, at every location. And nothing in it says that neighbouring pixels belong together; permuting the pixels of every image in the same way would leave it exactly as easy to train. Images have the opposite structure: what matters is local (edges, textures, parts), and a cat is a cat wherever it stands.
The convolution is a cross-correlation#
For one input channel, one output channel and stride 1, a convolution layer with kernel and bias computes
for every position where the window fits: and , so the output is . Each output is the dot product of the kernel with one window of the input, and the window slides over the image.
Strictly, this is a cross-correlation. The convolution of signal processing flips the kernel, , which makes the operation commutative and gives it its algebraic properties. The two differ only by the flip: convolving with is the same as cross-correlating with rotated by 180 degrees. Since the kernel is learned, a network trained with one would simply learn the flipped kernel with the other, and deep-learning libraries compute the cross-correlation and call it a convolution (Goodfellow, Bengio and Courville, 2016, section 9.1). This course does the same.
Worked example. A input whose right half is brighter than its left, and a kernel that subtracts the left column of a window from its right column:
The output is . Its top-left entry multiplies the top-left window of by entry by entry and adds the nine products:
Sliding the window one column right gives , and the second row gives and . All four are positive because in every window the right column is brighter than the left: the kernel is a detector of dark-to-bright vertical edges. A true convolution with the same flips it into a bright-to-dark detector and gives .
A convolution as a sliding dot product
- Place the kernel on the top-left window of the input.
- Multiply window and kernel entry by entry: nine products.
- Add the products and the bias: .
- Slide the window by the stride and repeat: , then and on the next row.
It is still a linear layer. Flatten into a vector of 16 numbers and into 4. The map is linear, so it is a matrix. Each row has the nine entries of in the positions of its window and zeros elsewhere, and all four rows contain the same nine numbers. A fully connected layer between the same shapes has 64 free weights; the convolution has 9. Everything said about linear layers in the backpropagation note, including how gradients flow through them, applies unchanged; the gradient with respect to simply adds up the contributions of all the positions that share it.
Channels and the weight shape#
A colour image has three channels and a hidden feature map has dozens or hundreds. A convolution reads all input channels at once: its filter for output channel is a block, one kernel per input channel, and the results are added:
The weight tensor is , in this order in PyTorch’s nn.Conv2d, and the bias has one entry per output channel. The layer has
The parameters do not depend on the size of the image; the cost grows with the size of the output. Papers usually report this count of multiply-adds and call it FLOPs, as the ResNet paper does explicitly (He et al., 2016, section 3.3), although a multiply-add is two floating-point operations.
Worked example. The first layer of a ResNet for images is a convolution from 3 to 64 channels with stride 2 and padding 3, without bias since batch normalization follows. Its output is (the size formula is in the next section). It has weights and costs multiply-adds per image, about 3% of the 3.8 billion of a whole ResNet-50 (He et al., 2016, Table 1). The same input mapped to a map by a convolution with padding 1 has parameters, against the of the fully connected baseline.
How these weights are initialized is in Normalization and initialization; the fan-in of a convolution and PyTorch’s default initialization are in the Generative Models course, which also draws the shapes. What the first layers learn is the subject of Convolutional architectures and its transfer-learning section.
Padding, stride and dilation#
Three hyperparameters change which inputs each output reads. None of them changes the number of weights.
- Padding adds rows and columns of zeros on every side. Without it, every layer shrinks the map by , and border pixels are read by fewer windows than central ones. With for odd and stride 1, the output has the size of the input (“same” padding).
- Stride moves the window by pixels instead of 1, so the layer computes only every -th output in each direction. Stride 2 halves the resolution and cuts the cost by 4.
- Dilation spreads the kernel: its taps read every -th pixel, so a kernel with covers a area with 9 weights. In general the kernel spans pixels.
With all three, the output entry reads the padded input at rows and columns , and the output size is
and the same for (Dumoulin and Visin, 2016). Why: the padded input has rows, and the kernel spans of them, so a window can start at any row from to . The stride allows only the multiples of in that range, and there are of them. Substituting gives the formula. When does not divide , the floor drops the last rows of the input: they are never read.
Worked example. The input of the previous section with : without padding , as computed; with , ; with and , . The ResNet stem above: . AlexNet’s first layer used kernels with stride 4 on crops (Krizhevsky, Sutskever and Hinton, 2012, section 3.5); with padding 2 that gives .
Stride and dilation change which inputs an output reads
How far a unit sees: the receptive field#
The receptive field of a unit is the set of input pixels that can affect its value. For one layer it is . A unit of a second layer reads a window of the first layer, whose units together read a window of the input. Depth makes the field grow, and stride and dilation make it grow faster.
For a stack of layers with kernel sizes , strides and dilations , the width of the receptive field after layer follows
(Araujo, Norris and Sim, 2019). Here is the jump of layer : the distance, in input pixels, between the receptive fields of two neighbouring units of that layer. The reasoning:
- A unit of layer reads units of layer in each direction, spaced apart.
- Neighbouring units of layer have fields shifted by input pixels, so its first and last tap are input pixels apart.
- Each tap sees pixels, so together they cover .
- A stride makes the units of layer themselves times further apart than those of layer : .
Pooling layers count as layers with their own window and stride.
Worked examples.
- Stride 1. A stack of layers of with stride 1 has and : five layers see pixels. Growth is linear and slow.
- Downsampling. With stride 2 in every second layer, the jump doubles every two layers: after 1 to 8 layers.
- Dilation. With dilations and stride 1, : 3, 7, 15, 31, up to 511 after 8 layers, with no loss of resolution. This is the context module of Yu and Koltun (2016), section 2, built for segmentation, where the output must keep the size of the input.
- VGG-16. The convolutional part of VGG-16 (Simonyan and Zisserman, 2015), five groups of two or three layers each followed by a max pool with stride 2, gives its last convolutional unit a field of pixels, and after the last pooling.
The receptive field grows with depth
The receptive field says which pixels can matter, not how much. In a trained network, the influence of the input on a unit is concentrated near the centre of its field and falls off roughly like a Gaussian, so the effective receptive field covers only a fraction of the theoretical one (Luo et al., 2016). For a classifier, the practical rule is that the units feeding the final decision should have fields at least as large as the objects to recognize.
Pooling#
A pooling layer summarizes each window of every channel by one number, with no weights. Max pooling and average pooling with window and stride compute, channel by channel,
The common choice halves the height and width and keeps the number of channels. Pooling does three things: it lowers the resolution, so later layers are cheaper and their fields larger; it summarizes a window by its strongest (or average) response; and, for max pooling, it makes the output insensitive to where exactly inside a window the response occurred. In backpropagation, max pooling passes the gradient only to the position of the maximum, and average pooling spreads it evenly.
Worked example. A feature map that is zero except for a single 1 at row 0, column 0. Max pooling with gives . Move the 1 to column 1, inside the same window: the output does not change. Move it to column 2, into the next window: the output becomes , the old output shifted by one. A shift of one input pixel is absorbed; a shift of two input pixels moves the output by one.
AlexNet used overlapping max pooling, windows with stride 2, and found it lowered its top-1 and top-5 errors by 0.4 and 0.3 points against windows with stride 2 (Krizhevsky, Sutskever and Hinton, 2012, section 3.4). Later networks often replace pooling inside the network by strided convolutions, as ResNet does, but keep one special case at the end: global average pooling averages each channel over the whole map, turning into a vector of numbers for the classifier (Lin, Chen and Yan, 2014). It has no parameters, and the network then accepts images of any size.
Equivariance and invariance#
Write for the translation that moves an image pixels to the right, . A map is equivariant to translations if translating the input translates the output, , and invariant if it leaves the output unchanged, . A feature map should be equivariant: the edge has moved, so its detection should move. A class label should be invariant: the cat is still a cat.
A convolution with stride 1 is equivariant. In one dimension, with the input extended indefinitely,
The first and last steps are the definitions, the middle ones substitute and recognize the convolution at position . The bias and any pointwise nonlinearity are the same at every position, so they keep the property, and so does a whole stack of such layers (Goodfellow, Bengio and Courville, 2016, section 9.2). On a finite image the identity holds exactly with circular padding and, with zero padding, everywhere except near the borders.
Equivariance holds only for translations. A rotated or rescaled pattern produces a different response, and the network learns such variations from data and augmentation.
Stride and pooling break it. A layer with stride computes every -th output of a stride-1 layer, so translating the input by a multiple of translates the output by , while a translation by one pixel picks a different subset of outputs. In the Code section, a random filter applied to a random image with stride 1 and circular padding commutes with a one-pixel shift up to rounding (). With stride 2 the one-pixel shift changes the output by up to , while a two-pixel shift moves it by exactly one position. A network with five stride-2 stages is exactly equivariant only to shifts by multiples of 32 pixels, and even small shifts of the input can change the predictions of standard classifiers (Azulay and Weiss, 2019). Blurring before every subsampling step, as signal processing prescribes, restores much of the lost stability (Zhang, 2019).
A classifier gets invariance from pooling. Global average pooling of an equivariant map is invariant to circular shifts of the input, since a sum over all positions does not depend on their order; local max pooling adds tolerance to shifts within a window, as in the worked example above.
Pointwise convolutions: mixing channels#
With the formula of the channels section becomes
the same linear map from to numbers, applied to the channel vector of every pixel separately. This or pointwise convolution does not look at neighbours at all. It mixes channels, and it changes their number cheaply: from 256 to 64 channels it costs weights and as many multiply-adds per pixel, a ninth of a layer between the same channels. Followed by a nonlinearity, it is a small fully connected network applied at every position, the “network in network” of Lin, Chen and Yan (2014). The next note uses it to shrink the channels before an expensive layer (the Inception and ResNet bottlenecks) and to mix channels after a per-channel convolution (MobileNet).
Transposed convolution: going up in resolution#
Segmentation, generation and autoencoders need the opposite of a strided convolution: a layer that turns a small map into a larger one. Since a convolution is linear, for a sparse matrix with rows and columns. The transposed convolution computes : it maps a vector of size to one of size , with the same sparsity pattern and the same shared weights. It is not an inverse, , but it has the right shapes and the right connectivity. It is also exactly the backward pass of the convolution with respect to its input, which is how libraries implement it and how the Code section checks it.
Read entry by entry, every input pixel of the transposed convolution paints a copy of the kernel, scaled by its value, onto the output, with copies placed pixels apart; where copies overlap, they add. The output size inverts the formula of the convolution:
where , output_padding in PyTorch, resolves the ambiguity created by the floor: a convolution with stride 2 and padding 1 maps both 7 and 8 rows to 4, and chooses which one to return.
Checkerboard artifacts. When is not divisible by , the copies overlap unevenly (Odena, Dumoulin and Olah, 2016). With and , a copy covers 3 output pixels and the next one starts 2 pixels later, so one pixel in every two receives two copies and the other one. On a input of ones with a kernel of ones, the output alternates between 1, 2 and 4 in a checkerboard. With and , every interior pixel receives exactly two copies in each direction, four in all, and the interior is flat.
Transposed convolution with stride 2: uneven overlap
A trained kernel can in principle cancel the pattern, but generators that use , often show it, and even kernels divisible by the stride leave a tendency towards it. The usual remedy, resizing by interpolation followed by an ordinary convolution, is discussed with autoencoders in the Generative Models course; Semantic segmentation uses both.
What changed#
| Fully connected layer | Convolution | |
|---|---|---|
| Inputs per output | all | a window of every channel |
| Parameters, | () | |
| Depends on image size | parameters and cost | cost only |
| Translation | must be learned at every position | equivariant (stride 1), detected everywhere |
| Field of view | the whole image in one layer | grows with depth, stride and dilation |
| Changing resolution | fixed by the weight matrix | stride and pooling down, transposed convolution up |
Limitations#
- Locality is a prior, and a strong one. A convolution can relate distant pixels only through depth or pooling; long-range dependencies need many layers, and the effective field is smaller than the theoretical one. Vision Transformers drop the prior and let every patch attend to every other.
- Equivariance only to translations, and only with stride 1. Rotations, scalings and changes of viewpoint must be learned; subsampling makes even translation equivariance approximate.
- Borders are special. With zero padding, units near the border see partly artificial input, and equivariance fails there.
- Cost is in the large maps. The parameters sit in the deep, many-channel layers, but the multiply-adds concentrate where the maps are large; the two budgets must be read separately.
- Transposed convolutions overlap unevenly unless the kernel size is a multiple of the stride, and even then can leave artifacts.
What you should remember#
- A convolution layer computes on the padded input: a cross-correlation (no kernel flip), linear, with weights .
- Parameters: , independent of image size. Cost: multiply-adds, often called FLOPs.
- Output size: ; “same” padding is for odd .
- Receptive field: with jump ; linear growth with stride 1, exponential with repeated stride or doubling dilation.
- A stride-1 convolution is translation-equivariant; stride and pooling make that approximate; global pooling turns it into invariance.
- A convolution is a linear map across channels at every pixel; a transposed convolution is the adjoint of a convolution and overlaps unevenly when does not divide .
Code#
A convolution written as loops and checked against F.conv2d for several strides, paddings and dilations; the worked example; output sizes and costs; receptive fields read off the gradient; equivariance, pooling, the convolution, and the transposed convolution as a backward pass. Seeds are fixed; differences of the order of are float32 rounding, and exact digits can differ across platforms and library versions. The script runs in about a second on a laptop CPU.
import torch
from torch import nn
import torch.nn.functional as F
# 1. a convolution written as loops: cross-correlation with channels, bias, stride, padding and dilation
def conv2d_loops(x, w, b, stride=1, padding=0, dilation=1):
# x: (C_in, H, W), w: (C_out, C_in, k, k), b: (C_out,)
C_out, C_in, k, _ = w.shape
x = F.pad(x, (padding, padding, padding, padding)) # zeros on all four sides
H_out = (x.shape[1] - dilation * (k - 1) - 1) // stride + 1
W_out = (x.shape[2] - dilation * (k - 1) - 1) // stride + 1
y = torch.zeros(C_out, H_out, W_out)
for o in range(C_out):
for i in range(H_out):
for j in range(W_out):
s = b[o]
for c in range(C_in):
for m in range(k):
for n in range(k):
s = s + w[o, c, m, n] * x[c, stride * i + dilation * m, stride * j + dilation * n]
y[o, i, j] = s
return y
# the worked example: a 4 x 4 image and a 3 x 3 vertical-edge kernel, no padding, stride 1
X = torch.tensor([[1., 0, 2, 3], [0, 1, 3, 2], [1, 0, 2, 3], [0, 1, 2, 3]])
K = torch.tensor([[-1., 0, 1], [-1, 0, 1], [-1, 0, 1]])
print(conv2d_loops(X[None], K[None, None], torch.zeros(1))[0].tolist()) # [[5.0, 7.0], [6.0, 6.0]]
print(F.conv2d(X[None, None], K[None, None])[0, 0].tolist()) # the same
print(F.conv2d(X[None, None], K.flip(0, 1)[None, None])[0, 0].tolist()) # a true convolution flips the kernel: [[-5.0, -7.0], [-6.0, -6.0]]
# random tensors, every setting at once, against the library
torch.manual_seed(0)
for s, p, d in [(1, 0, 1), (1, 1, 1), (2, 1, 1), (1, 2, 2), (2, 3, 3)]:
x, w, b = torch.randn(3, 9, 9), torch.randn(4, 3, 3, 3), torch.randn(4)
mine = conv2d_loops(x, w, b, s, p, d)
ref = F.conv2d(x[None], w, b, stride=s, padding=p, dilation=d)[0]
print((s, p, d), tuple(mine.shape), f'{(mine - ref).abs().max().item():.1e}')
# (1, 0, 1) (4, 7, 7) 2.9e-06 | (1, 1, 1) (4, 9, 9) 2.9e-06 | (2, 1, 1) (4, 5, 5) 1.9e-06
# (1, 2, 2) (4, 9, 9) 2.9e-06 | (2, 3, 3) (4, 5, 5) 1.9e-06 (stride, padding, dilation), output shape, max difference
# 2. output sizes and costs
size = lambda h, k, s=1, p=0, d=1: (h + 2 * p - d * (k - 1) - 1) // s + 1
print(size(4, 3), size(4, 3, p=1), size(4, 3, s=2, p=1), size(224, 11, s=4, p=2), size(224, 7, s=2, p=3)) # 2 4 2 55 112
stem = nn.Conv2d(3, 64, 7, stride=2, padding=3, bias=False)
print(sum(q.numel() for q in stem.parameters()), 64 * 3 * 7 * 7 * 112 * 112) # 9408 118013952: weights, multiply-adds
print(224 * 224 * 3 * 224 * 224 * 64, sum(q.numel() for q in nn.Conv2d(3, 64, 3, padding=1).parameters()))
# 483385147392 1792: a dense layer between the same two shapes, against a 3 x 3 convolution
# 3. receptive field: which inputs reach the centre output? read it off the gradient
def receptive_field(layers, n=64):
x = torch.zeros(1, 1, n, n, requires_grad=True)
y = x
for layer in layers:
y = layer(y)
c = y.shape[-1] // 2
y[0, 0, c, c].backward()
rows = (x.grad[0, 0].abs().sum(1) > 0).nonzero()
return int(rows.max() - rows.min() + 1)
def ones(k, s=1, d=1):
conv = nn.Conv2d(1, 1, k, stride=s, dilation=d, bias=False)
nn.init.ones_(conv.weight)
return conv
print([receptive_field([ones(3) for _ in range(L)]) for L in (1, 2, 3, 5)]) # [3, 5, 7, 11]
print([receptive_field([ones(3, d=2 ** i) for i in range(L)]) for L in (1, 2, 3, 4)]) # [3, 7, 15, 31]
print(receptive_field([ones(3), ones(3), nn.AvgPool2d(2), ones(3), ones(3), nn.AvgPool2d(2), ones(3)])) # 24
# (average pooling here: the gradient of max pooling reaches only the maximum, which hides part of the field)
def rf(layers): # the recursion r_l = r_{l-1} + (k_l - 1) d_l j_{l-1}, j_l = j_{l-1} s_l
r, j = 1, 1
for k, s, d in layers:
r, j = r + (k - 1) * d * j, j * s
return r
vgg16 = []
for convs in (2, 2, 3, 3, 3):
vgg16 += [(3, 1, 1)] * convs + [(2, 2, 1)]
print([rf([(3, 2 if i % 2 else 1, 1) for i in range(L)]) for L in range(1, 9)]) # stride 2 in every second layer
print(rf([(3, 1, 1)] * 2 + [(2, 2, 1)] + [(3, 1, 1)] * 2 + [(2, 2, 1)] + [(3, 1, 1)]), rf(vgg16[:-1]), rf(vgg16))
# [3, 5, 9, 13, 21, 29, 45, 61]
# 24 196 212: the stack above, VGG-16 at its last convolution and after its last pooling
# 4. equivariance and invariance
torch.manual_seed(1)
x = torch.randn(1, 1, 16, 16)
w = torch.randn(1, 1, 3, 3)
shift = lambda t, k: torch.roll(t, k, dims=-1) # move the image k pixels right
conv = lambda t, s=1: F.conv2d(F.pad(t, (1, 1, 1, 1), mode='circular'), w, stride=s)
print(f'{(conv(shift(x, 1)) - shift(conv(x), 1)).abs().max().item():.1e}') # 9.5e-07: shift, then convolve = convolve, then shift
print(f'{(conv(shift(x, 1), 2) - conv(x, 2)).abs().max().item():.2f}', # stride 2: a one-pixel shift changes the output,
f'{(conv(shift(x, 2), 2) - shift(conv(x, 2), 1)).abs().max().item():.1e}') # a two-pixel shift moves it by one: 10.65 0.0e+00
peak = lambda col: torch.zeros(1, 1, 4, 4).index_put_((torch.tensor(0), torch.tensor(0), torch.tensor(0), torch.tensor(col)), torch.tensor(1.))
for col in (0, 1, 2):
print(col, F.max_pool2d(peak(col), 2)[0, 0].tolist())
# 0 [[1.0, 0.0], [0.0, 0.0]] | 1 [[1.0, 0.0], [0.0, 0.0]] | 2 [[0.0, 1.0], [0.0, 0.0]]
# 5. a 1 x 1 convolution is a linear layer applied at every pixel
one = nn.Conv2d(256, 64, 1)
lin = nn.Linear(256, 64)
lin.weight.data, lin.bias.data = one.weight.data[:, :, 0, 0], one.bias.data
x = torch.randn(2, 256, 7, 7)
print(sum(q.numel() for q in one.parameters()), f'{(one(x) - lin(x.permute(0, 2, 3, 1)).permute(0, 3, 1, 2)).abs().max().item():.1e}')
# 16448 6.0e-07
# 6. the transposed convolution is the backward pass of a convolution, and it overlaps unevenly
x = torch.randn(1, 2, 8, 8, requires_grad=True)
w = torch.randn(3, 2, 3, 3) # 3 output channels, 2 input channels
y = F.conv2d(x, w, stride=2, padding=1)
g = torch.randn_like(y)
(y * g).sum().backward() # x.grad = C^T g
print(tuple(y.shape), f'{(x.grad - F.conv_transpose2d(g, w, stride=2, padding=1, output_padding=1)).abs().max().item():.1e}')
# (1, 3, 4, 4) 0.0e+00
for k in (3, 4):
out = F.conv_transpose2d(torch.ones(1, 1, 4, 4), torch.ones(1, 1, k, k), stride=2)[0, 0]
print(k, tuple(out.shape), out[4].tolist())
# 3 (9, 9) [2.0, 2.0, 4.0, 2.0, 4.0, 2.0, 4.0, 2.0, 2.0]
# 4 (10, 10) [2.0, 2.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 2.0, 2.0]
Next#
One layer is now understood: its shapes, its cost and what it sees. What remains open is how to stack it. Deeper stacks see more and compute richer features, but the parameters and the cost grow quickly, and past a certain depth plain stacks stop training well. The next note follows the architectures that answered these questions one at a time, from LeNet and AlexNet through VGG’s stacked layers and Inception’s bottlenecks to residual networks, and on to the efficient designs of MobileNet and EfficientNet.
References#
- I. Goodfellow, Y. Bengio, A. Courville. Deep Learning. MIT Press, 2016. Chapter 9: section 9.1 (the convolution and cross-correlation), 9.2 (sparse interactions, parameter sharing, equivariance), 9.3 (pooling), 9.5 (stride, padding and other variants).
- A. Zhang, Z. C. Lipton, M. Li, A. J. Smola. Dive into Deep Learning. Cambridge University Press, 2023. Chapter 7 (from fully connected layers to convolutions, padding and stride, channels and convolutions, pooling), section 14.10 (transposed convolution).
- S. J. D. Prince. Understanding Deep Learning. MIT Press, 2023. Chapter 10 (convolutional networks).
- V. Dumoulin, F. Visin. A guide to convolution arithmetic for deep learning. arXiv:1603.07285, 2016. Output sizes of convolutions, pooling and transposed convolutions.
- A. Araujo, W. Norris, J. Sim. Computing receptive fields of convolutional neural networks. Distill, 2019.
- W. Luo, Y. Li, R. Urtasun, R. Zemel. Understanding the effective receptive field in deep convolutional neural networks. NeurIPS, 2016.
- F. Yu, V. Koltun. Multi-scale context aggregation by dilated convolutions. ICLR, 2016. Section 2 (dilated convolutions and the exponential growth of the receptive field).
- K. Simonyan, A. Zisserman. Very deep convolutional networks for large-scale image recognition. ICLR, 2015.
- A. Krizhevsky, I. Sutskever, G. E. Hinton. ImageNet classification with deep convolutional neural networks. NeurIPS, 2012. Section 3.4 (overlapping pooling), section 3.5 (the first layer).
- K. He, X. Zhang, S. Ren, J. Sun. Deep residual learning for image recognition. CVPR, 2016. Table 1 (the stem and the FLOPs of ResNet-50), section 3.3 (FLOPs as multiply-adds).
- M. Lin, Q. Chen, S. Yan. Network in network. ICLR, 2014. convolutions as a per-pixel network, global average pooling.
- A. Azulay, Y. Weiss. Why do deep convolutional networks generalize so poorly to small image transformations? Journal of Machine Learning Research, 20(184):1–25, 2019.
- R. Zhang. Making convolutional networks shift-invariant again. ICML, 2019.
- A. Odena, V. Dumoulin, C. Olah. Deconvolution and checkerboard artifacts. Distill, 2016.
- PyTorch documentation:
Conv2d,ConvTranspose2d. - Глубинное обучение 1 (Deep Learning 1), Faculty of Computer Science, HSE University. Course materials, repository xiyori/intro-to-dl-hse, branch 2025-2026: lecture 4 (convolutions, padding, stride, dilation, receptive field, channels, pooling).