MCPcopy Create free account
hub / github.com/tensorflow/lingvo / AdjustGradients

Method AdjustGradients

lingvo/core/learner.py:353–393  ·  view source on GitHub ↗

Adjusts gradients according to learner params. Args: var_grads: a `.NestedMap` whose values are (var, grad) pairs. gradient_mask: if not None, a dict mapping variable names to a 0/1 scalar. gradient_adjuster: if not None, a function that mutates a given var_grads. Returns

(self,
                      var_grads,
                      gradient_mask=None,
                      gradient_adjuster=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

ApplyMethod · 0.95

Calls 2

_AddEvalMetricMethod · 0.95
ScaleGradientsMethod · 0.95

Tested by

no test coverage detected