boundlab.zono.interpret#

boundlab.zono.interpret = <boundlab.interp.Interpreter object>#

Zonotope-based interpreter.

Examples

>>> import torch
>>> from torch import nn
>>> import boundlab.expr as expr
>>> import boundlab.zono as zono
>>> op = zono.interpret(nn.Linear(2, 1))
>>> y = op(expr.ConstVal(torch.zeros(2)) + expr.LpEpsilon([2]))
>>> y.shape
torch.Size([1])