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

Method forward

fairseq/models/lightconv.py:574–633  ·  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, encoder_padding_mask, incremental_state,
                prev_conv_state=None, prev_attn_state=None, conv_mask=None,
                conv_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 5

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

Tested by

no test coverage detected