boundlab.diff.zono3.DiffSoftmax#

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

Bases: OpHandler

Differential softmax over the last axis.

Plain expressions are delegated to fallback (the domain’s standard softmax handler), so this handler owns the operator outright.

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 = 'softmax'#
fallback: OpHandler | None = None#
condition(x, **params)[source]#

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

handle(interp, x, **params)[source]#

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

__init__(op='softmax', fallback=None)#
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]] = []#