boundlab.diff.ops.heaviside_pruning#

boundlab.diff.ops.heaviside_pruning(scores, data)[source]#

Mock score-based pruning: network 1 keeps data, network 2 masks it.

Network 2 computes heaviside(scores) * data with h(0) = 1, matching the abstract interpreters’ scores >= 0 convention. Eagerly this evaluates the pruned network, so the model can be sampled directly.