Type I_TransformGradients
Namespace tensorflow_estimator.contrib.estimator
Interfaces IOptimizer
Methods
Public instance methods
object apply_gradients(object grads_and_vars, object global_step, object name)
object compute_gradients(IDictionary<string, object> kwargs, Object[] args)
Compute gradients of "loss" for the variables in "var_list". This simply wraps the compute_gradients() from the real optimizer. The
gradients will be aggregated in the apply_gradients() so that user can
modify the gradients like clipping with per replica global norm if needed.
The global norm with aggregated gradients can be bad as one replica's huge
gradients can hurt the gradients from other replicas.
Parameters
-
IDictionary<string, object>
kwargs - Keyword arguments for compute_gradients().
-
Object[]
args - Arguments for compute_gradients().
Returns
-
object
- A list of (gradient, variable) pairs.