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

Function AdjustGradientsWithLpLoss

lingvo/core/py_utils.py:3402–3500  ·  view source on GitHub ↗

Adjusts the map of (var, grad) with Lp regularization, where p=1.0 or 2.0. Args: var_grads: a `.NestedMap` or list of (variable, gradient). lp_regularizer_weight: Lp regularization weight. p: For now we support 1.0 or 2.0. Returns: A tuple (lp_loss, var_grads). - lp_loss:

(var_grads, lp_regularizer_weight, p=2.0)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 5

FlattenFunction · 0.85
ShouldAdjustFunction · 0.85
TransformFunction · 0.85
SumSquaredFunction · 0.85
SumAbsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…