Returns: tuple: - the decoder's features of shape `(batch, tgt_len, embed_dim)` - a dictionary with any model-specific outputs
(self, prev_output_tokens, encoder_out=None, **kwargs)
| 40 | return x, extra |
| 41 | |
| 42 | def extract_features(self, prev_output_tokens, encoder_out=None, **kwargs): |
| 43 | """ |
| 44 | Returns: |
| 45 | tuple: |
| 46 | - the decoder's features of shape `(batch, tgt_len, embed_dim)` |
| 47 | - a dictionary with any model-specific outputs |
| 48 | """ |
| 49 | raise NotImplementedError |
| 50 | |
| 51 | def output_layer(self, features, **kwargs): |
| 52 | """ |