ConstraintStep¶
Chainable step that allows parameters (or in some cases, gradients) to be constrained by projecting them into the desired form.
This node can be used to apply different types of constraints, including non- negativity and zeroing out NaNs. Generally this node should be the last one in the chain, and follow any negation step. Version 0.2.0
Ports/Properties¶
gradients¶
Gradients to be transformed.
weights¶
Optional current weights.
state¶
Explicit state of the node.
projection¶
Optional projection operation.
constraint¶
Constraint to apply. Non-negative maintains non-negative parameters, zeroing out any negative values. Zero-nans zeros out any NaN values from gradients. general-projection can be used to implement projected gradient descent, but in this case this node must be the final step in the chain, and must be preceded by the negative rescaling.
param¶
Parameter of the constraint, if any.
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.