Optimizer Wrappers#
|
A function that wraps an optimizer to make it robust to a few NaNs or Infs. |
|
State of the GradientTransformation returned by apply_if_finite. |
|
Flattens parameters and gradients for init and update of inner transform. |
|
Lookahead optimizer. |
|
Holds a pair of slow and fast parameters for the lookahead optimizer. |
|
State of the GradientTransformation returned by lookahead. |
|
Mask updates so only some are transformed, the rest are passed through. |
|
Maintains inner transform state for masked transformations. |
|
An optimizer wrapper to accumulate gradients over multiple steps. |
|
State of the GradientTransformation returned by MultiSteps. |
|
|
|
Returns True if the global norm square of updates is small enough. |
|
Returns True iff any of the updates contains an inf or a NaN. |