boundlab.zonosq.QuadraticEpsilon#

class boundlab.zonosq.QuadraticEpsilon[source]#

Bases: TupleExpr

Tuple of (eps, eps^2, eps' * eps^2) for eps, eps' in [-1, 1].

Methods

__init__

backward

Concretize a*eps + b*eps^2 + c*eps'*eps^2 for each output.

to_string

Convert this expression to a string for debugging purposes.

with_children

Return a new TupleExpr with the same flags but new children.

__init__(epsilon)[source]#
property shape: tuple[torch.Size, ...]#
property children: tuple[Expr, ...]#

Children expressions that contribute to this TupleExpr. This is used for topological sorting and weight propagation.

backward(*weights, direction='==')[source]#

Concretize a*eps + b*eps^2 + c*eps'*eps^2 for each output.

with_children(*new_children)[source]#

Return a new TupleExpr with the same flags but new children. This is used for expression rewriting during bound propagation.

to_string(*children_str, indent=0)[source]#

Convert this expression to a string for debugging purposes. The children_str arguments are the string representations of the children expressions, in the same order as self.children.