PYTHON · NUMPY
Absmean: rounding a net to three states

A trained layer, simulated as a small-magnitude Gaussian matrix. Ternarize it with the absmean rule and read the honest ledger: which values survive, how many go to zero, and how much you lost. The starter divides by the wrong scale — fix the one marked line.

You read

the arrays and values already in scope

You change

the code you write in each cell

Fixed

the dataset and the checks that grade you