boundlab.diff.zono3.DiffBounds#

class boundlab.diff.zono3.DiffBounds[source]#

Bases: object

Affine enclosures for both branches and for their difference.

x and y are ordinary zonotope relaxations, branch ≈ slope·input + bias ± error·ε.

The difference is enclosed as:

diff ≈ diff_slope·d + diff_x_weight·x + diff_y_weight·y + diff_bias
       ± diff_x_error·ε_x ± diff_y_error·ε_y ± diff_error·ε_new

where ε_x and ε_y are the same symbols the x and y enclosures introduced. A weight or error left at 0 costs nothing.

Methods

name: str#
x: LinearBounds#
y: LinearBounds#
diff_slope: Tensor#
diff_bias: Tensor#
diff_error: Tensor#
diff_x_weight: Tensor | float = 0.0#
diff_y_weight: Tensor | float = 0.0#
diff_x_error: Tensor | float = 0.0#
diff_y_error: Tensor | float = 0.0#
__init__(name, x, y, diff_slope, diff_bias, diff_error, diff_x_weight=0.0, diff_y_weight=0.0, diff_x_error=0.0, diff_y_error=0.0)#