class_docstr: Model Parallel Transformer decoder consisting of *args.decoder_layers* layers. Each layer
  is a :class:`ModelParallelTransformerDecoderLayer`.
class_docstr_tok: ["Model","Parallel","Transformer","decoder","consisting","of","*","args.decoder_layers","*","layers",".","Each","layer","is","a",":","class",":","`","ModelParallelTransformerDecoderLayer","`","."]
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 not self.share_input_output_embed:
          raise NotImplementedError(
              "Model parallel training currently requires --share-decoder-input-output-embed"
          )
  
      features = copy_to_model_parallel_region(features)
  
      # project back to size of vocabulary
      x = self.output_projection(features)
  
      if (
          getattr(self.args, "criterion")
          != "vocab_parallel_cross_entropy"
      ):
          x = gather_from_model_parallel_region(x).contiguous()
      return x
  
file_path: fairseq/fairseq/model_parallel/models/transformer.py
imports: import logging
  import torch.nn
  from fairseq.model_parallel.modules import ModelParallelTransformerDecoderLayer, ModelParallelTransformerEncoderLayer
  from fairseq.models import register_model
  from fairseq.models.transformer import TransformerDecoder, TransformerEncoder, TransformerModel
label_desc: Use image node_id 2 for calling the ModelParallelTransformerDecoder obj's underlying member method code with example usage: obj.output_layer(features) and returns: x