Missed TensorFlow World? Check out the recap. Learn more

tf.contrib.training.multiply_gradients

View source on GitHub

Multiply specified gradients.

tf.contrib.training.multiply_gradients(
    grads_and_vars,
    gradient_multipliers
)

Args:

  • grads_and_vars: A list of gradient to variable pairs (tuples).
  • gradient_multipliers: A map from either Variables or Variable op names to the coefficient by which the associated gradient should be scaled.

Returns:

The updated list of gradient to variable pairs.

Raises:

  • ValueError: If grads_and_vars is not a list or if gradient_multipliers is empty or None or if gradient_multipliers is not a dictionary.