optax.identity

Contents

optax.identity#

optax.identity() GradientTransformation[source]#

Stateless identity transformation that leaves input gradients untouched.

This function passes through the gradient updates unchanged.

Note, this should not to be confused with set_to_zero, which maps the input updates to zero - which is the transform required for the model parameters to be left unchanged when the updates are applied to them.

Returns:

A optax.GradientTransformation object.