class_docstr: Output projection layer.
class_docstr_tok: ["Output","projection","layer","."]
code: def forward(
      self,
      x,
      src_tokens=None,
      input_tokens=None,
      possible_translation_tokens=None,
  ):
      output_projection_w = self.output_projection_w
      output_projection_b = self.output_projection_b
      decoder_input_tokens = input_tokens if self.training else None
  
      if (
          self.vocab_reduction_module
          and possible_translation_tokens is None
      ):
          possible_translation_tokens = self.vocab_reduction_module(
              src_tokens, decoder_input_tokens=decoder_input_tokens
          )
  
      if possible_translation_tokens is not None:
          output_projection_w = output_projection_w.index_select(
              dim=0, index=possible_translation_tokens
          )
          output_projection_b = output_projection_b.index_select(
              dim=0, index=possible_translation_tokens
          )
  
      # avoiding transpose of projection weights during ONNX tracing
      batch_time_hidden = torch.onnx.operators.shape_as_tensor(x)
      x_flat_shape = torch.cat(
          (torch.LongTensor([-1]), batch_time_hidden[2].view(1))
      )
      x_flat = torch.onnx.operators.reshape_from_tensor_shape(
          x, x_flat_shape
      )
  
      projection_flat = torch.matmul(
          output_projection_w, x_flat.t()
      ).t()
      logits_shape = torch.cat(
          (batch_time_hidden[:2], torch.LongTensor([-1]))
      )
      logits = (
          torch.onnx.operators.reshape_from_tensor_shape(
              projection_flat, logits_shape
          )
          + output_projection_b
      )
      return logits, possible_translation_tokens
  
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 2 for calling the OutputProjection obj's underlying member method code with example usage: obj.forward(x, src_tokens, input_tokens, possible_translation_tokens) and returns: logits,  possible_translation_tokens