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

Method ComputeLoss

lingvo/tasks/mt/decoder.py:2828–2865  ·  view source on GitHub ↗

Populates a metrics dictionary based on the output of ComputePredictions. Args: theta: Nested map describing decoder model parameters. predictions: NestedMap describing the decoding process, requiring: .softmax_input: Tensor of shape [time, batch, params.softmax.input_dim].

(self, theta, predictions, targets)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 3

_FPropFastSoftmaxMethod · 0.95
_FPropSoftmaxMethod · 0.45

Tested by

no test coverage detected