One Example at a Time

Training Deep NetworksMedium+20 XP+20

One Example at a Time

Batch norm, group norm and instance norm all do the same two things: subtract a mean, then divide by a spread. They differ only in which numbers share that mean and spread.

Picture a layer's output for a whole batch as a block of numbers labelled three ways:

  • example: which item in the batch,
  • neuron: which neuron in the layer (image and audio models call these channels),
  • position: in image and audio models, each neuron produces one number per pixel or time step. A plain fully-connected layer has exactly one position.
methodone mean and spread for each...computed over
batch normneuronevery example in the batch, every position
group normexample, and group of neuronsevery neuron in that group, every position
instance normexample, and neuronevery position

Each one then computes (x−mean)/variance+ε(x - \text{mean}) / \sqrt{\text{variance} + \varepsilon}(x−mean)/variance+ε​ with ε=0.00001\varepsilon = 0.00001ε=0.00001, and afterwards applies its learned scale and shift.

A team is training a network built from plain fully-connected layers. Its inputs are so large that only one example fits in memory, so it trains with a batch size of 1. One hidden layer has 6 neurons, and group norm would split them into two groups of 3. For the current training example, that layer's six outputs are

(2, 6, −1, 5, 4, 0)(2,\ 6,\ -1,\ 5,\ 4,\ 0)(2, 6, −1, 5, 4, 0)

The team is deciding which normalization to put after this layer.

Looking at the normalized values before the learned scale and shift, which of the three methods passes on anything that depends on the input?

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.