boundlab.diff.ops#
Custom operators that mark differential structure inside a model.
These are ordinary Python functions that lower to custom-domain ONNX nodes
(boundlab::DiffPair, boundlab::HeavisidePruning, …) when the model is
exported with boundlab.interp.onnx_export(). The BoundLab interpreter
turns those nodes back into DiffExpr2 /
DiffExpr3 values; run eagerly, each op evaluates
the second (modified) network so the very same module can be executed
concretely for Monte-Carlo checks.
Importing this module registers the custom ONNX op names with
boundlab.interp, so boundlab:: nodes dispatch to the handler names
diff_pair, heaviside_pruning, softmax_pruning and topk_pruning.
Functions
Mark |
|
Mock score-based pruning: network 1 keeps |
|
Mock softmax pruning: network 1 is |
|
Mock top-k pruning: network 2 keeps the |
Classes
Two parallel linear layers paired through |
|
Lift a |