code: def __init__(
      self,
      src_dict,
      dst_dict,
      out_embed_dim=512,
      encoder_hidden_dim=None,
      pointer_attention_heads=1,
      fixed_generation_vocab=None,
      attention_dropout=0.2,
      model_output_logprob=True,
  ):
      super().__init__()
      self.linear_projection = nn.Linear(
          out_embed_dim,
          len(fixed_generation_vocab)
          if fixed_generation_vocab
          else len(dst_dict),
      )
      self.num_embeddings = len(dst_dict)
      self.pointer_projection = nn.Linear(
          encoder_hidden_dim, out_embed_dim
      )
      self.pointer_prob_map = nn.Linear(
          out_embed_dim + out_embed_dim, 1
      )
      self.pointer_attention = DecoupledMultiheadAttention(
          out_embed_dim,
          out_embed_dim,
          pointer_attention_heads,
          src_length_mask=False,
          dropout=attention_dropout,
      )
      self.fixed_vocab = not (fixed_generation_vocab is None)
      if self.fixed_vocab:
          assert isinstance(
              fixed_generation_vocab, list
          ), "List of indices is what is expected for fixed_generation_vocab"
          self.fixed_generation_vocab_expanded: Tensor = (
              torch.tensor(fixed_generation_vocab, dtype=torch.long)
              .unsqueeze(0)
              .unsqueeze(0)
          )
      else:
          # make TorchScript happy
          self.fixed_generation_vocab_expanded: Tensor = torch.zeros(
              [1]
          )
  
      self.register_buffer(
          "fixed_generation_vocab_expanded_buffer",
          self.fixed_generation_vocab_expanded,
      )
      self.model_output_logprob = model_output_logprob
  
file_path: pytext/pytext/models/seq_models/projection_layers.py
imports: from typing import Dict, Optional, Tuple
  import torch
  import torch.nn.functional
  from pytext.models.seq_models.utils import Linear
  from torch import nn, Tensor
  from .attention import DecoupledMultiheadAttention
  from .utils import verify_encoder_out
label_desc: Use image node_id 1 to create a new DecoupledDecoderHead object from inherited base classes: nn with example: obj = DecoupledDecoderHead(src_dict, dst_dict, out_embed_dim, encoder_hidden_dim, pointer_attention_heads, fixed_generation_vocab, attention_dropout, model_output_logprob)