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

Method forward

fairseq/modules/transformer_layer.py:67–107  ·  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``. attn_mask (ByteTensor): binary tens

(self, x, encoder_padding_mask, attn_mask=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 4

maybe_layer_normMethod · 0.95
self_attnMethod · 0.45
fc1Method · 0.45
fc2Method · 0.45

Tested by

no test coverage detected