EasyDeepLearn

What is Xavier (Glorot) initialization and why?

medium

Answer

  • Sample weights from a distribution with variance 2  /  (fanin  +  fanout)2\; / \;(\mathrm{fan}_{\mathrm{in}}\; + \;\mathrm{fan}_{\mathrm{out}}) — designed so that activations and gradients have roughly the same variance layer to layer for tanh/sigmoid activations.
  • Prevents both vanishing and exploding signals at initialization.
  • Default in older frameworks; replaced by He init when ReLU became the standard.
Check yourself — multiple choice
  • Xavier init works best for ReLU networks
  • Xavier uses Var  =  2/(fanin  +  fanout)\operatorname{Var}\; = \;2 / (\mathrm{fan}_{\mathrm{in}}\; + \;\mathrm{fan}_{\mathrm{out}}) to keep signal variance stable across tanh layers
  • Xavier initializes all weights to zero
  • Xavier depends on batch size

Xavier: variance 2/(fanin+fanout)2 / (\mathrm{fan}_{\mathrm{in}} + \mathrm{fan}_{\mathrm{out}}) — for tanh/sigmoid.

#initialization#training

Practise Deep Learning

214 interview questions in this topic.

Related questions