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

Function WeightedAvg

lingvo/core/py_utils.py:3605–3638  ·  view source on GitHub ↗

Computes weighted average of values from a tensor. Args: values: a tensor of values. weights: a tensor of weights. sum_reduction_fn: called to reduce the values and weights. axis: the axis to reduce over; defaults to all (i.e. to a scalar). name: name of metric. Returns:

(
    values: tf.Tensor,
    weights: tf.Tensor,
    sum_reduction_fn: ReductionProtocol = tf.reduce_sum,
    axis: Optional[int] = None,
    name: str = '',
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

WeightedAvgOfMetricsFunction · 0.85

Calls 2

with_dependenciesFunction · 0.85
assert_equalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…