docstr: Project features to the vocabulary size.
docstr_tok: ["Project","features","to","the","vocabulary","size","."]
code: def output_layer(self, features, **kwargs):
      """Project features to the vocabulary size."""
      if self.adaptive_softmax is None:
          # project back to size of vocabulary
          if self.share_input_output_embed:
              if isinstance(self.embed_tokens, nn.ModuleList):
                  output = None
                  for i, emb in enumerate(self.embed_tokens):
                      sidx = i * emb.embedding_dim
                      eidx = (i + 1) * emb.embedding_dim
                      if output is None:
                          output = F.linear(
                              features[:, :, sidx:eidx], emb.weight
                          )
                      else:
                          output += F.linear(
                              features[:, :, sidx:eidx], emb.weight
                          )
  
                  return output
              else:
                  return F.linear(features, self.embed_tokens.weight)
          else:
              return F.linear(features, self.embed_tokens)
      else:
          return features
  
imports: import math
  from collections import namedtuple
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import options, utils
  from fairseq.modules import AdaptiveSoftmax, LayerNorm, MultiheadAttention, PositionalEmbedding
label_desc: Use image node_id 3 for calling the TransformerDecoderOutputLayer obj's underlying member method code with example usage: obj.output_layer(features) and returns: features, F, output, F