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

Method ExtendStep

lingvo/core/batch_major_attention.py:4655–4759  ·  view source on GitHub ↗

Computes the value vector given the query of the current step. This function is used by autoregressive decoding. Used for self-attention (hence S=T) with p.causal_masking is True. We compute the key/value/key_dists at `time_step` and cache the updated full length results in `cache_

(self,
                 theta: py_utils.NestedMap,
                 query_vec: tf.Tensor,
                 cached_states: py_utils.NestedMap,
                 paddings: Optional[tf.Tensor],
                 time_step: int,
                 segment_mask: None = None,
                 per_step_padding: None = None,
                 use_short_seq_opt: bool = False)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 10

ExtendStepMethod · 0.45
ExtendStepMethod · 0.45
ExtendStepMethod · 0.45
ExtendStepMethod · 0.45
_AttenExtendStepMethod · 0.45
ExtendStepMethod · 0.45
_FnMethod · 0.45
ExtendStepMethod · 0.45
ExtendStepMethod · 0.45
ExtendStepMethod · 0.45

Calls 4

_DotAttenOneStepMethod · 0.95
FPropMethod · 0.45
LayerNormMethod · 0.45
UpdateMethod · 0.45

Tested by

no test coverage detected