Args: src_tokens (LongTensor): tokens in the source language of shape `(batch, src_len)` src_lengths (LongTensor): lengths of each source sentence of shape `(batch)`
(self, src_tokens, src_lengths=None, **kwargs)
| 31 | self.dictionary = dictionary |
| 32 | |
| 33 | def forward(self, src_tokens, src_lengths=None, **kwargs): |
| 34 | """ |
| 35 | Args: |
| 36 | src_tokens (LongTensor): tokens in the source language of shape |
| 37 | `(batch, src_len)` |
| 38 | src_lengths (LongTensor): lengths of each source sentence of shape |
| 39 | `(batch)` |
| 40 | """ |
| 41 | raise NotImplementedError |
| 42 | |
| 43 | def forward_torchscript(self, net_input: Dict[str, Tensor]): |
| 44 | """A TorchScript-compatible version of forward. |
no outgoing calls
no test coverage detected