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

Method _PreBeamSearchStepCallback

lingvo/tasks/mt/decoder.py:1975–2036  ·  view source on GitHub ↗

Returns logits for sampling ids and the next model states. Args: theta: A `.NestedMap` object containing weights' values of this layer and its children layers. encoder_outputs: a NestedMap computed by encoder. step_ids: A tensor of shape [tgt_batch, 1]. states: A

(self, theta, encoder_outputs, step_ids, states,
                                 num_hyps_per_beam, cur_step)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

PreBeamSearchCallbackMethod · 0.95

Calls 4

ExtendStepMethod · 0.95
PackMethod · 0.80
FlattenMethod · 0.45
LogitsMethod · 0.45

Tested by

no test coverage detected