ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

tf.keras.backend.gradients

TensorFlow 2 version View source on GitHub

Returns the gradients of loss w.r.t. variables.

loss Scalar tensor to minimize.
variables List of variables.

A gradients tensor.