Bars: each scheme's forward factor
nin·Var(
W) (solid) and backward factor
nout·Var(
W) (faint), log scale; 1 (the dark line) means the variance passes through the layer unchanged. Click a scheme to show its numbers above.
Standard (Var = 1/(3
nin)) shrinks the forward signal to 1/3 at every layer.
Forward Xavier fixes the forward factor at 1 but leaves the backward factor at
nout/
nin, and
backward Xavier does the reverse.
Glorot uses the harmonic mean of the two ideal variances, 2/(
nin +
nout), so the two factors always average to exactly 1: neither is ever more than 2× too large, and the other errs by (
nin +
nout)/(2
nsmaller), always less than the
nlarger/
nsmaller that a one-sided Xavier suffers. For a layer that expands 4×, Glorot gives 0.4 and 1.6, where forward Xavier gives 1 and 4. The rules behind both formulas are on the
variance page. Both factors assume the activation is roughly the identity near 0, as tanh is.