boundlab.diff.onnx.diff_net#
- boundlab.diff.onnx.diff_net(net1, net2)[source]#
Pair the initializers of two structurally identical ONNX models.
- Parameters:
net1 (Model | str | Path) – Models with the same node sequence and input arities. Each may be an
onnx_ir.Model, astr, or apathlib.Path.net2 (Model | str | Path) – Models with the same node sequence and input arities. Each may be an
onnx_ir.Model, astr, or apathlib.Path.
- Returns:
A merged
onnx_ir.Modelwhose paired parameters flow throughboundlab::DiffPairnodes.
- Raises:
ValueError – If the two graphs differ in node count, node type, or input arity.
- Return type:
Model