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

Method _RemoveEOSProbs

lingvo/tasks/mt/decoder.py:1382–1431  ·  view source on GitHub ↗

Remove the attention probs on EOS symbol and renormalize. Args: p: decoder params. probs: attention probs matrix; float [batch, target_len, source_len]. source_enc_len: source encoder length; int [batch]. Returns: probs with value on last actual token (EOS token) re

(self, p, probs, source_enc_len)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

_FPropMethod · 0.95
ExtendStepMethod · 0.95
test_RemoveEOSProbsMethod · 0.95
_FPropMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_RemoveEOSProbsMethod · 0.76