New custom constraints are encouraged to subclass
An R6Class generator object
You can implement a custom constraint either by creating an
R function that accepts a weights (
w) parameter, or by creating
an R6 class that derives from
KerasConstraint and implements a
Constrain the specified weights.