code: def __init__(
      self,
      decoder_hidden_state_dim,
      context_dim,
      force_projection=False,
      src_length_masking=True,
  ):
      super().__init__()
      self.decoder_hidden_state_dim = decoder_hidden_state_dim
      self.context_dim = context_dim
  
      self.input_proj = None
      if force_projection or decoder_hidden_state_dim != context_dim:
          self.input_proj = nn.Linear(
              decoder_hidden_state_dim, context_dim, bias=True
          )
      self.src_length_masking = src_length_masking
      log_class_usage(__class__)
  
imports: from typing import Dict, Optional, Tuple
  import numpy
  import torch
  import torch.nn.functional
  from pytext.config import ConfigBase
  from pytext.utils.usage import log_class_usage
  from torch import nn, Tensor
  from .base import PyTextIncrementalDecoderComponent
  from .utils import Linear
label_desc: Use image node_id 1 to create a new DotAttention object from inherited base classes: nn with example: obj = DotAttention(decoder_hidden_state_dim, context_dim, force_projection, src_length_masking)