Deep in a network, a layer’s outputs can drift: some examples come out huge, some tiny, and the next layer struggles. Write normalize(batch): batch is a list of examples, each a list of one layer’s outputs. Rescale them so the next layer always sees numbers of a standard size, whatever came in. The starter uses the standard score from “Who did better?” with the whole batch’s average and spread.
A layer’s outputs for example A, in a batch of two. The starter rescales the whole batch with its own average and spread. Watch what the next layer sees of A when its neighbour changes, though A itself doesn’t.
normalize(batch)| batch | a list of examples, each a list of one layer's outputs | e.g. [[1, 2, 3, 6], [0.5, 1, 0, 2.5]] |
| returns | the batch rescaled to a standard size, same shape | |