Weight Initialization in PyTorch: Eight Layers, One Output

PyTorch's default weight initialization gives a plain ReLU network the same output for every input by eight layers deep. One line of He init fixes it.

Cover Image for Weight Initialization in PyTorch: Eight Layers, One Output

You're training a classifier to tell shirts from shoes, but its accuracy stays near chance for the first few epochs. You check the data and the learning rate, and the network's activations are still non-zero. The starting weights deserve a look too. Weight initialisation in PyTorch sets the scale of the signal that each layer passes on, and nn.Linear chooses that scale unless you tell it otherwise. Its default comes from Lua Torch, carried over to preserve existing behaviour, and differs from both Xavier and He initialisation.

We trace the starting scale through a plain ReLU network without normalisation or residual connections. After eight layers, input-dependent variation is only 0.004% of default output energy. That model stays at 10% accuracy for six to eight epochs. He initialisation reaches 78% to 83% in three epochs. The twenty-layer default remains at chance through 20 epochs across the seeds and learning rates tested.

Let's Build It

Open In Colab

Before any code, here is the whole result in one picture. Take 600 test images, push them through two untrained 30-layer networks that differ only in their initialization, and plot each layer's representation of every image. Each frame is rescaled to the size of that layer's signal, which removes overall shrinkage from the picture, so a shrinking cloud means the images are becoming indistinguishable.

Animation of 600 FashionMNIST test images passing through two untrained 30-layer ReLU networks, layer by layer. Under PyTorch's default initialization the cloud collapses to a single point by layer 10; under He initialization it stays spread out to the output

By layer 10 the default network has mapped all 600 images to what, at this scale, is a single point. The He network still tells them apart at the output. The code below measures that collapse with a single number and then shows what it does to training.

import torch
import torch.nn as nn
import torch.nn.functional as F
from torchvision import datasets

torch.set_num_threads(4)

# 10,000 FashionMNIST training images and the full test set, standardised
tr = datasets.FashionMNIST("data", train=True, download=True)
te = datasets.FashionMNIST("data", train=False, download=True)
idx = torch.randperm(60_000, generator=torch.Generator().manual_seed(0))[:10_000]
x_tr, y_tr = tr.data[idx].float().div(255).view(-1, 784), tr.targets[idx]
x_te, y_te = te.data.float().div(255).view(-1, 784), te.targets
mu, sd = x_tr.mean(), x_tr.std()
x_tr, x_te = (x_tr - mu) / sd, (x_te - mu) / sd


def mlp(depth, width=256):
    layers, d = [], 784
    for _ in range(depth):
        layers += [nn.Linear(d, width), nn.ReLU()]
        d = width
    return nn.Sequential(*layers, nn.Linear(d, 10))


def he_init(model):
    for m in model.modules():
        if isinstance(m, nn.Linear):
            nn.init.kaiming_normal_(m.weight, nonlinearity="relu")
            nn.init.zeros_(m.bias)


@torch.no_grad()
def input_share(model, x):
    """Fraction of the output's energy that changes from one input to the next."""
    out = model(x)
    return (out.var(dim=0).mean() / out.pow(2).mean()).item()


def train(model, epochs=3, lr=0.01, seed=0):
    opt = torch.optim.SGD(model.parameters(), lr=lr, momentum=0.9)
    g = torch.Generator().manual_seed(seed)
    for _ in range(epochs):
        for b in torch.randperm(10_000, generator=g).split(128):
            loss = F.cross_entropy(model(x_tr[b]), y_tr[b])
            opt.zero_grad()
            loss.backward()
            opt.step()
    with torch.no_grad():
        return (model(x_te).argmax(1) == y_te).float().mean().item()


for depth in (4, 8, 20):
    for name in ("default", "he"):
        torch.manual_seed(0)
        model = mlp(depth)
        if name == "he":
            he_init(model)
        share = input_share(model, x_tr[:512])
        print(f"depth {depth:2d}  {name:7s}  input share {share:.1e}  "
              f"test accuracy {train(model):.3f}")

It runs in about ten seconds on four CPU cores:

depth  4  default  input share 2.9e-02  test accuracy 0.779
depth  4  he       input share 3.5e-01  test accuracy 0.841
depth  8  default  input share 3.9e-05  test accuracy 0.100
depth  8  he       input share 2.8e-01  test accuracy 0.832
depth 20  default  input share 2.4e-14  test accuracy 0.100
depth 20  he       input share 1.4e-01  test accuracy 0.780

The runs share architecture, data, optimiser and seed and differ only in the he_init call, which after three epochs at eight layers separates a working classifier from a constant. The input share column shows why. At depth 20 the default's output varies from one image to the next by a fraction indistinguishable from floating-point rounding, which leaves the optimiser nothing to work with. Expect He's accuracies to differ in the third decimal on other hardware, while the default's 0.100 reproduces exactly.

What Just Happened?

The default, read from the source

When you write nn.Linear(256, 256), the constructor calls reset_parameters, and in PyTorch 2.x that method reads:

def reset_parameters(self) -> None:
    # Setting a=sqrt(5) in kaiming_uniform is the same as initializing with
    # uniform(-1/sqrt(in_features), 1/sqrt(in_features)). For details, see
    # https://github.com/pytorch/pytorch/issues/57109
    init.kaiming_uniform_(self.weight, a=math.sqrt(5))
    if self.bias is not None:
        fan_in, _ = init._calculate_fan_in_and_fan_out(self.weight)
        bound = 1 / math.sqrt(fan_in) if fan_in > 0 else 0
        init.uniform_(self.bias, -bound, bound)

The name kaiming_uniform_ is misleading. The argument a is the negative slope of a leaky ReLU, and setting it to 5\sqrt{5} drives the gain down to 2/(1+5)=1/3\sqrt{2/(1+5)} = 1/\sqrt{3}. The comment says what comes out: every weight is drawn uniformly from [−1/n,1/n][-1/\sqrt{n}, 1/\sqrt{n}], where nn is the fan-in. A uniform distribution on [−b,b][-b, b] has variance b2/3b^2/3, so

Var⁡[w]=13n,nVar⁡[w]=13.\operatorname{Var}[w] = \frac{1}{3n}, \qquad n \operatorname{Var}[w] = \frac{1}{3}.

He initialization sets nVar⁡[w]=2n \operatorname{Var}[w] = 2. The default is one sixth of that. Measured on a fresh nn.Linear(256, 256), the variance times the fan-in comes out at 0.331, and nn.Conv2d(64, 64, 3) gives 0.334 with its fan-in of 576. The biases are drawn from the same box, which turns out to matter more than the weights.

Histogram of the 65,536 weights of a default nn.Linear(256, 256), a flat box between plus and minus 1/16, overlaid on a He-initialized layer's bell curve, which is six times wider in variance

Variance through one layer

The whole theory of initialization is one line of algebra. A linear unit adds up nn inputs, each multiplied by an independent zero-mean weight, so the variance of its output is

Var⁡[y]=nVar⁡[w] E[x2].\operatorname{Var}[y] = n \operatorname{Var}[w] \, \mathbb{E}[x^2].

A ReLU then zeroes the negative half of a symmetric distribution, which halves its second moment. Put the two together and every layer multiplies the signal's second moment by the same factor:

g=12 nVar⁡[w].g = \tfrac{1}{2} \, n \operatorname{Var}[w].

That factor is all you need to predict what a deep stack does:

initializationnVar⁡[w]n \operatorname{Var}[w]gain per layer ggafter 20 layers
PyTorch default1/31/62.7×10−162.7 \times 10^{-16}
Xavier (fan-in equals fan-out)11/29.5×10−79.5 \times 10^{-7}
He211

He initialization is the choice of Var⁡[w]\operatorname{Var}[w] that makes g=1g = 1, so the signal neither shrinks nor grows however deep you go. Xavier was derived for units like tanh that do not halve the signal, so on a ReLU network it loses half the variance per layer. The default loses five sixths.

The bias floor

If that table were the whole story, the default's activations would vanish fastest of the three. The figure below says otherwise:

Activation standard deviation by layer in a 30-layer network, log scale. He stays near 1, Xavier falls steadily to about 1e-5, default weights with zero bias fall to 1e-12, and the PyTorch default falls for four layers and then sits flat at 0.023, on a dashed line marking the predicted bias floor

Xavier vanishes on schedule, to a standard deviation of 0.001 at layer 20, which is what the gain of one half predicts from its starting value. The default's weights with the biases zeroed vanish faster still, to 10−1210^{-12} by layer 30, also as predicted. But the default as PyTorch ships it falls for four layers and then stops, at a standard deviation of about 0.023, and stays there for the rest of the network.

The biases hold it up. Each layer shrinks the incoming signal by six and then adds a fresh bias whose variance is also 1/(3n)1/(3n). The pre-activation variance qq therefore follows

ql+1=16 ql+13n,q_{l+1} = \tfrac{1}{6} \, q_l + \frac{1}{3n},

which settles at the fixed point q∗=2/(5n)q^* = 2/(5n). For n=256n = 256 that is a pre-activation standard deviation of 0.040, and after the ReLU, 0.023. The measured plateau is 0.022 to 0.024. A network that looks healthy by the standard diagnostic, activations that neither vanish nor explode, can still be broken.

Input share by layer

The floor itself causes the failure. The bias added at each layer is the same for every input. Each layer shrinks the part of the signal that came from the image by a factor of six and adds back a part that came from nowhere, so the share of the signal that depends on the input falls geometrically while the total stays constant:

Left: the input-dependent share of the signal by layer at initialization, log scale. He and default-weights-with-zero-bias stay between 0.1 and 1; the PyTorch default falls along a dotted line marking a factor of six per layer, from 0.7 at layer 1 to 1e-14 by layer 22, then flattens at floating-point noise. Right: test accuracy after 3 epochs of SGD against depth, with He flat near 0.81 and the default falling from 0.81 at two layers to chance at eight

From layer 5 onwards the measured share on the first seed falls by 5.3, 5.7, 6.0, 6.1 and 5.9 per layer, against the predicted 6. By the output it is 3×10−153 \times 10^{-15}, which is floating-point rounding. The zero-bias variant, the amber line, keeps the input's share near He's. The default's weights therefore shrink the signal, while its biases remove the input's contribution to it.

The right panel is the training consequence over three epochs. The default trains at two and three layers, falls six points behind He at four, drops to 51% at six, and from eight layers onwards is still at chance when He has finished. The collapse at initialization predicts the depth at which training stalls.

Going Deeper

Depth sweep

The depth sweep is three seeds per point, SGD with momentum 0.9 at a learning rate of 0.01, three epochs on 10,000 images. Averaged over seeds:

hidden layers2346810 to 20
PyTorch default0.8130.8010.7660.5080.1000.100
He0.8310.8270.8260.8190.8100.799 to 0.815

Every default run from eight layers on scores exactly 0.100 after three epochs, on every seed. A score of exactly 0.100 means the network predicts one class for every image.

Eight hidden layers is modest by any current standard, and well within the range of the from-scratch exercises that teach deep learning. While the exact depths are specific to this width and data, a plain stack of nn.Linear and nn.ReLU on PyTorch's defaults loses accuracy within a few layers and stalls soon after, and from then on needs an explicit initialization or a normalisation layer.

Learning-rate sweep

The obvious objection is that SGD at 0.01 was the wrong setting for the default network. Sweeping the learning rate, three seeds per cell, three epochs:

depth and init0.0030.010.030.1
20, PyTorch default0.100 on all three0.100 on all three0.100 on all three0.100 on all three
20, He0.774 to 0.7980.780 to 0.8130.657 to 0.7210.100 on all three
8, PyTorch default0.100 to 0.1220.100 on all three0.178 to 0.2340.320 to 0.488
8, He0.796 to 0.8260.784 to 0.8320.785 to 0.8250.100 to 0.780

At depth 20 no learning rate moves the default off chance, and training for 20 epochs instead of 3 leaves it there too. All three seeds finish with a training loss between 2.3023 and 2.3031, against ln⁡10=2.3026\ln 10 = 2.3026, the loss of a uniform guess over ten classes. An output that ignores the input can do no better than predict the class frequencies, and FashionMNIST's ten classes are balanced.

Depth 8 behaves differently. A larger step partly compensates for the small gradients, so at 0.1, the rate at which He starts to diverge, the default reaches 32% to 49%. Given enough epochs it also escapes at the standard rate: at 0.01 it sits at chance for six to eight epochs, then climbs, and reaches 77% to 81% by epoch 20, where He passes 78% within three. At eight layers the default delays training by most of a 20-epoch budget. At twenty layers training never starts.

The backward pass

Backpropagation runs the same multiplication in reverse. The gradient reaching layer ll is the gradient at layer l+1l+1 times the transposed weights and the ReLU's on-off mask, one factor in a product of Jacobians, so its second moment shrinks by the same factor gg per layer. For the default that is a factor of 6≈2.45\sqrt{6} \approx 2.45 in the gradient's norm, every layer, all the way back.

Weight-gradient norm by layer on the first batch, depth 20, log scale. He's gradients are flat between 1 and 10; Xavier's are flat near 0.002; the PyTorch default's fall from 0.02 at the output to below 1e-7 at the first layers, along a straight line on the log scale

Measured between layer 8 and the output, the default's gradient norm shrinks by 2.42 to 2.51 per layer. The first layer receives a gradient 280,000 to 390,000 times smaller than the output layer's. The curve flattens over the first few layers only because those layers' inputs are still large (the activations have not yet sunk to the floor), and a weight gradient is the product of the incoming activation and the outgoing error.

This is the mirror image of the forward collapse, and Schoenholz and colleagues showed that the two are the same phenomenon, governed by the same per-layer factor gg in both directions. A network that cannot tell its inputs apart cannot send a useful error signal to its early layers either.

Adam and Xavier: partial rescues

Training loss curves for default, Xavier and He at depth 5 and depth 20, under SGD with momentum and under Adam, three seeds as bands. Under SGD at depth 20 the default sits on the ln 10 line throughout; under Adam it descends slowly with a wide spread across seeds

Two partial escapes show up in the training curves. Adam divides each parameter's step by a running estimate of that parameter's gradient magnitude (the optimisers post builds it from scratch), so a gradient hundreds of thousands of times smaller than the output layer's still produces a step of normal size. That is why Adam moves the default network at depth 20 when SGD cannot. It does so slowly and erratically: 23%, 46% and 49% across the three seeds after three epochs, against 78% to 79% for He under the same optimiser. These marginal runs are also fragile in a way the clear-cut ones are not. Running the same code on two threads instead of four, which changes only the order of floating-point additions, left one of these seeds at chance and took the other two to 56% and 59%. Under the same change the SGD default stayed at 0.100 and He moved by at most four points.

Xavier is the more instructive case. With zero biases, a ReLU network is positively homogeneous: multiply every weight matrix by a constant and the output is multiplied by a constant too, with every direction unchanged. Xavier and He draw from the same normal distribution at different scales, so a Xavier network is the He network shrunk by 1/21/\sqrt{2} per layer. Its input share is identical to He's to four decimal places. Its failure is purely one of size: at depth 20 its activations and gradients are roughly a thousand times smaller than He's, and SGD reaches 31% to 48% in three epochs where He reaches 78% to 81%. Adam, which ignores gradient scale, takes Xavier to 59% to 73%.

The default fails in a different way. While Xavier's shortfall in scale can be partly undone by an adaptive optimiser, the default's biases have replaced the information in the signal. At depth 20 they leave an input share of 10−1410^{-14}, below floating-point resolution, and no optimiser can recover information the forward pass no longer carries.

Architectures that absorb a bad initialization

None of this means PyTorch's default is a bug you need to fight in every model. Adding nn.BatchNorm1d after each linear layer of the depth-20 network:

default + BatchNorm   0.744  0.753  0.783
He      + BatchNorm   0.750  0.750  0.744

The two initializations become indistinguishable. Batch normalisation rescales every layer's pre-activations to unit variance on each batch, which removes both the shrinkage and the floor, so the initial scale of the weights stops mattering. That is one reason batch normalisation made deep networks easier to train, and why networks with normalisation layers do not show this failure.

Residual connections protect a network by a different route: each block adds its input back to its output, so even a branch that shrinks the signal leaves the identity path intact. That arm was not measured here. Transformers usually sidestep the question in a third way, by overwriting PyTorch's default with their own scheme. Hugging Face's GPT-2, for one, draws its weights from a normal distribution with standard deviation 0.02, set by the initializer_range field of the model config, and zeroes the biases.

The default bites in the places those protections are absent: plain MLPs, custom architectures written from scratch, small networks where normalisation is left out to save time, and research code that strips a model down to isolate an effect.

Applying an initialization in practice

model.apply visits every submodule, so one function covers a whole network:

def init_weights(m):
    if isinstance(m, (nn.Linear, nn.Conv2d)):
        nn.init.kaiming_normal_(m.weight, mode="fan_in", nonlinearity="relu")
        if m.bias is not None:
            nn.init.zeros_(m.bias)

model.apply(init_weights)

Three arguments trip people up:

  • a is the leaky-ReLU slope. It sets the negative slope of the leaky ReLU the layer feeds into. Copying kaiming_uniform_(w, a=math.sqrt(5)) out of PyTorch's own source gives you the default, with a sixth of He's variance.
  • nonlinearity sets the gain. kaiming_normal_ defaults to nonlinearity="leaky_relu" with a=0, which happens to give the same gain of 2\sqrt{2} as "relu", so the default call is right for ReLU networks. For tanh, use xavier_normal_(w, gain=nn.init.calculate_gain("tanh")), which applies a gain of 5/3.
  • mode chooses which pass to protect. "fan_in" preserves the forward signal; "fan_out" preserves the backward gradient. torchvision's ResNet uses mode="fan_out". He and colleagues showed that either one alone keeps both passes from growing or shrinking exponentially in common network designs, so the choice matters less than making one.

Initialize biases to zero unless you have a specific reason not to. The default's random biases drain the input in the experiments above.

Choosing a scheme

The table earlier is the decision rule. Pick the variance that makes the gain per layer equal to one for the activation you use:

  • ReLU and its relatives: He (kaiming_normal_ or kaiming_uniform_). Leaky ReLU: pass its slope as a.
  • tanh, sigmoid, or no activation: Xavier (xavier_normal_ or xavier_uniform_), with calculate_gain for the activation.
  • Uniform or normal: they are the same variance with different shapes. He's uniform bound is 6/n\sqrt{6/n}, its normal standard deviation 2/n\sqrt{2/n}. Neither shape has a consistent advantage, since signal propagation depends only on the variance.
  • With batch or layer normalisation after every layer: the scheme matters much less, as the BatchNorm arm shows. Set one anyway, since it costs one line.

When you are unsure whether a model is affected, measure it. The input_share function above, run on a batch of real inputs before training, takes milliseconds. In the experiments here, an output share below about 10−310^{-3} went with networks that trained poorly or not at all in three epochs of SGD, because the forward pass had already discarded most of the input.

Where This Comes From

Yann LeCun, Léon Bottou, Genevieve Orr and Klaus-Robert Müller's 1998 chapter "Efficient BackProp" set out the variance argument this whole post rests on. Its recommendation is explicit:

"Assuming that: 1. the training set has been normalized, and 2. the sigmoid from Figure 4b has been used then weights should be randomly drawn from a distribution (e.g. uniform) with mean zero and standard deviation σw=m−1/2\sigma_w = m^{-1/2} where m is the fan-in (the number of connections feeding into the node)."

The sigmoid in that recommendation is their scaled tanh, 1.7159tanh⁡(2x/3)1.7159 \tanh(2x/3). Under it, the right variance is 1/n1/n, three times what PyTorch's default gives. The default comes from somewhere else. Asked on the PyTorch issue tracker why nn.Linear uses a=math.sqrt(5), Soumith Chintala explained:

"the code refactor from jramseyer changes the default pytorch initialization from manually initializing the weights by calling random number generator function uniform to using torch.nn.init.kaiming -- but it wanted to have the same end-result in weights, because we wanted to preserve backward-compatibility. So the sqrt(5) is nothing more than giving the code the same end-result as before."

In a later comment on the same question he traced the uniform ±1/n\pm 1/\sqrt{n} box back through Lush, SENNA, Torch5 and Torch7, adding that it "is not recorded in literature anywhere but has been recorded in code". The source confirms the continuity: PyTorch 0.4.1 drew uniform_(-stdv, stdv) with stdv = 1/sqrt(n) directly, and PyTorch 1.0 reached the same distribution through kaiming_uniform_.

Timeline from LeCun et al. 1998 through the Lush, SENNA and Torch heuristic, Glorot and Bengio 2010, He et al. 2015 and Schoenholz et al. 2017 to PyTorch 1.0 in 2018, distinguishing initializations derived from the variance argument from the inherited heuristic

Xavier Glorot and Yoshua Bengio's 2010 paper "Understanding the difficulty of training deep feedforward neural networks" used that same heuristic as its baseline, with the biases set to zero:

"We initialized the biases to be 0 and the weights WijW_{ij} at each layer with the following commonly used heuristic: Wij∼U[−1/n,1/n]W_{ij} \sim U[-1/\sqrt{n}, 1/\sqrt{n}]"

They identified its variance as the problem. "The standard initialization that we have used (eq.1) gives rise to variance with the following property: nVar⁡[W]=1/3n \operatorname{Var}[W] = 1/3 ... This will cause the variance of the back-propagated gradient to be dependent on the layer (and decreasing)." Their fix, which the paper calls "normalized initialization" and which is now called Xavier or Glorot initialization, balances the forward and backward passes by averaging the two fan counts:

W∼U ⁣[−6nj+nj+1,6nj+nj+1],Var⁡[W]=2nj+nj+1.W \sim U\!\left[-\frac{\sqrt{6}}{\sqrt{n_j + n_{j+1}}}, \frac{\sqrt{6}}{\sqrt{n_j + n_{j+1}}}\right], \qquad \operatorname{Var}[W] = \frac{2}{n_j + n_{j+1}}.

Their analysis assumed activations that are linear near zero, such as tanh. Kaiming He, Xiangyu Zhang, Shaoqing Ren and Jian Sun's 2015 ICCV paper, the one that also introduced the parametric ReLU, redid it for ReLU, where half of every unit's input distribution is zeroed. Their equation (10) is the gain-equals-one condition from the table above:

12 nlVar⁡[wl]=1,∀l.\tfrac{1}{2} \, n_l \operatorname{Var}[w_l] = 1, \quad \forall l.

"This product is the key to the initialization design. A proper initialization method should avoid reducing or magnifying the magnitudes of input signals exponentially."

They tested it on a 30-layer network, and the caption of their Figure 3 reports what this post found one level down: "Our initialization (red) is able to make it converge. But 'Xavier' (blue) [7] completely stalls - we also verify that its gradients are all diminishing. It does not converge even given more epochs."

The bias floor and the drained input need one more paper. Samuel Schoenholz, Justin Gilmer, Surya Ganguli and Jascha Sohl-Dickstein's "Deep Information Propagation" (ICLR 2017), building on Poole and colleagues' 2016 work, treats a random network's weights and biases together through mean-field theory. Two inputs that start out different become more or less correlated as they pass through each layer, and a single number decides which. For a ReLU network that number is χ1=12σw2\chi_1 = \tfrac{1}{2} \sigma_w^2, where σw2=nVar⁡[w]\sigma_w^2 = n \operatorname{Var}[w]: the same gain gg as before. Their description of the regime below one:

"χ1 = 1 represents a critical line separating an ordered phase (in which c∗ = 1 and all inputs end up asymptotically correlated) and a chaotic phase (in which c∗ < 1 and all inputs end up asymptotically decorrelated)."

PyTorch's default has χ1=1/6\chi_1 = 1/6, deep in the ordered phase. Inputs become correlated at the rate the measurements above show, a factor of six per layer, and the paper's backward-pass analysis predicts the gradient decay from the same number: "In the ordered phase, χ1 < 1 and so ξ∇>0\xi_\nabla > 0. We therefore expect gradients to vanish over a depth ∣ξ∇∣|\xi_\nabla|." The depth sweep reproduces their main practical result, that a random network can be trained only as deep as information can travel through it. He initialization with zero biases puts a ReLU network on the critical line, where the depth scale diverges. The input's share still drifts down under He, from 0.7 to 0.08 over thirty layers in the figures above, but slowly rather than by a factor of six per layer.

Further reading

  • For recurrent sequence models, LSTM from scratch measures how forget bias affects retention over 100 steps.

  • Efficient BackProp, LeCun, Bottou, Orr and Müller, 1998. Section 4.6 for the fan-in rule.

  • Understanding the difficulty of training deep feedforward neural networks, Glorot and Bengio, AISTATS 2010. Section 4.2 for the variance analysis and equation 16.

  • He, Zhang, Ren and Sun, ICCV 2015, arXiv:1502.01852. Section 2.2 for the ReLU derivation and Figure 3 for the 30-layer comparison.

  • Deep Information Propagation, Schoenholz, Gilmer, Ganguli and Sohl-Dickstein, ICLR 2017. Sections 3 and 4 for the depth scales and the backward pass.

  • PyTorch issues #15314 and #57109 for the history of the default.

Interactive Tools

Stay in the loop

Get notified when new tutorials and deep-dives are published. No spam, unsubscribe anytime.

Related Posts

Frequently Asked Questions