Learn Before
Example
Centered Layer
A practical example of a custom parameterless layer is a centered layer, which normalizes its input by subtracting the mean of the input tensor from each of its elements. Mathematically, for an input tensor , the forward propagation of this layer computes . This operation ensures that the output tensor always has a mean of exactly (subject to minor floating-point quantization errors).
0
1
Updated 2026-05-09
Tags
D2L
Dive into Deep Learning @ D2L