Two Layers, One Extra Weight

Deep Learning in the Real WorldMedium+20 XP+20

Two Layers, One Extra Weight

Two layers are quantized with the same rule. A grid stored in bbb bits has 2b2^b2b levels, evenly spaced, with the lowest level placed at the layer's smallest weight and the highest level at its largest weight. Every weight is then rounded to its nearest level.

  • Layer A. Its weights all lie between −0.3-0.3−0.3 and 0.30.30.3, and both ends are reached: the smallest weight is exactly −0.3-0.3−0.3 and the largest exactly 0.30.30.3.
  • Layer B. Exactly the same weights as layer A, plus one extra weight equal to 2.72.72.7.

For either layer, call the worst-case rounding error the largest error that any weight between −0.3-0.3−0.3 and 0.30.30.3 could receive.

Layer A is quantized to 4 bits. What is the smallest number of bits for layer B that makes its worst-case rounding error no larger than layer A's?

Hints

Solve it to unlock the solution

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

Select all that apply.