boundlab.ibp.MatmulBiased#

class boundlab.ibp.MatmulBiased[source]#

Bases: OpHandler

Peel the Bias centers off both operands.

(c1 + i1) @ (c2 + i2) expands into two exact linear maps (i1 @ c2, c1 @ i2), a constant c1 @ c2, and the remaining inner product i1 @ i2 re-dispatched to whichever handler covers the error components.

Methods

__init__

condition

Whether this handler applies to these operands (default: always).

handle

Transform the operands; sub-operations go through interp.<op> so the enclosing domain's handlers apply to them too.

override_handler

A copy of this handler that takes precedence over other when both are ready for the same call.

op: str = 'matmul'#
condition(x, y, **kwargs)[source]#

Whether this handler applies to these operands (default: always).

handle(interp, x, y, **kwargs)[source]#

Transform the operands; sub-operations go through interp.<op> so the enclosing domain’s handlers apply to them too.

override_handler(other)#

A copy of this handler that takes precedence over other when both are ready for the same call.

overrides: list[type[OpHandler]] = []#