class_docstr: Output projection layer.
class_docstr_tok: ["Output","projection","layer","."]
code: def __init__(
      self, out_embed_dim, vocab_size, vocab_reduction_module=None
  ):
      super().__init__()
      self.out_embed_dim = out_embed_dim
      self.vocab_size = vocab_size
  
      self.output_projection_w = nn.Parameter(
          torch.FloatTensor(
              self.vocab_size, self.out_embed_dim
          ).uniform_(-0.1, 0.1)
      )
      self.output_projection_b = nn.Parameter(
          torch.FloatTensor(self.vocab_size).zero_()
      )
      self.vocab_reduction_module = vocab_reduction_module
  
imports: import abc
  import math
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import utils
  from fairseq.models import FairseqIncrementalDecoder, transformer
  from pytorch_translate import rnn_cell, utils, vocab_reduction
  from pytorch_translate.research.lexical_choice import lexical_translation
label_desc: Use image node_id 1 to create a new OutputProjection object from inherited base classes: nn with example: obj = OutputProjection(out_embed_dim, vocab_size, vocab_reduction_module)