boundlab.polysp.softmax.SoftmaxConstrained#
- class boundlab.polysp.softmax.SoftmaxConstrained[source]#
Bases:
OpHandlerRun the domain’s softmax decomposition, then apply the sum-to-one constraint optimization (
softmax_opt()) to the result.Methods
Whether this handler applies to these operands (default: always).
Transform the operands; sub-operations go through
interp.<op>so the enclosing domain's handlers apply to them too.A copy of this handler that takes precedence over
otherwhen both are ready for the same call.- 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', inner=<factory>)#
- override_handler(other)#
A copy of this handler that takes precedence over
otherwhen both are ready for the same call.