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

Method forward

fairseq/models/fairseq_model.py:409–422  ·  view source on GitHub ↗

Run the forward pass for a encoder-only model. Feeds a batch of tokens through the encoder to generate features. Args: src_tokens (LongTensor): input tokens of shape `(batch, src_len)` src_lengths (LongTensor): source sentence lengths of shape `(bat

(self, src_tokens, src_lengths, **kwargs)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

encoderMethod · 0.80

Tested by

no test coverage detected