class_docstr: Common super class for decoder networks with output projection layers.
class_docstr_tok: ["Common","super","class","for","decoder","networks","with","output","projection","layers","."]
code: def forward(
      self,
      input_tokens,
      encoder_out: Dict[str, torch.Tensor],
      incremental_state: Optional[Dict[str, torch.Tensor]] = None,
      timestep: int = 0,
  ) -> Tuple[torch.Tensor, Dict[str, torch.Tensor]]:
      x, features = self.forward_unprojected(
          input_tokens, encoder_out, incremental_state
      )
      logits = self.linear_projection(x)
      return logits, features
  
imports: from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn.functional
  from fairseq import utils
  from pytext.config import ConfigBase
  from pytext.models.seq_models.base import PyTextSeq2SeqModule
  from pytext.utils.usage import log_class_usage
  from torch import nn
  from .attention import DotAttention
  from .base import PlaceholderIdentity, PyTextIncrementalDecoderComponent
label_desc: Use image node_id 3 for calling the DecoderWithLinearOutputProjection obj's underlying member method code with example usage: obj.forward(input_tokens, encoder_out, incremental_state, timestep) and returns: logits,  features