MCPcopy Create free account
hub / github.com/HA-Transformer/MAT / forward

Method forward

fairseq/modules/transformer_layer.py:186–261  ·  view source on GitHub ↗

Args: x (Tensor): input to the layer of shape `(seq_len, batch, embed_dim)` encoder_padding_mask (ByteTensor): binary ByteTensor of shape `(batch, src_len)` where padding elements are indicated by ``1``. Returns: encoded output of

(
        self,
        x,
        encoder_out=None,
        encoder_padding_mask=None,
        incremental_state=None,
        prev_self_attn_state=None,
        prev_attn_state=None,
        self_attn_mask=None,
        self_attn_padding_mask=None,
    )

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 7

maybe_layer_normMethod · 0.95
encoder_attnMethod · 0.80
_set_input_bufferMethod · 0.45
self_attnMethod · 0.45
fc1Method · 0.45
fc2Method · 0.45
_get_input_bufferMethod · 0.45

Tested by

no test coverage detected