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

Method _ForceAlignment

lingvo/tasks/mt/decoder.py:1144–1187  ·  view source on GitHub ↗

Update 'log_probs' to for alignment. We adjust 'log_probs' to disallow p.sentence_boundary_token_id or EOS if emitting it would result in a misaligned output with an unequal number of sentences. Args: log_probs: encoder's log_probs output. source_num_sentences: shape [b

(self, log_probs, source_num_sentences, hyp_num_sentences)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected