View source on GitHub

Returns a tf.Operation that applies gradients and incremements the global step.

optimizer An instance of tf.compat.v1.train.Optimizer or tf.keras.optimizers.Optimizer.
grads_and_vars List of (gradient, variable) pairs.
global_step An integer which corresponds to the number of batches seen by the graph.

A tf.Operation that when executed, applies gradients and increments the global step.