code: def __init__(
      self,
      input_size: int,
      vocab_size: int,
      max_sequence_length: int,
      use_attention: bool = False,
      use_bias: bool = True,
      attention_embedding_size: int = 256,
      attention_num_heads: int = 8,
      decoder_config=None,
      **kwargs,
  ):
      super().__init__()
      self.config = decoder_config
  
      self.vocab_size = vocab_size
      self.max_sequence_length = max_sequence_length
      self.input_size = input_size
      self.use_attention = use_attention
      if use_attention:
          logger.debug("  MultiHeadSelfAttention")
          self.self_attention = MultiHeadSelfAttention(
              input_size=input_size,
              hidden_size=attention_embedding_size,
              num_heads=attention_num_heads,
          )
          # Adjust the input size to the final projection layer.
          input_size = self.self_attention.output_shape[0]
      self.projection_layer = Dense(
          input_size=input_size,
          output_size=vocab_size,
          use_bias=use_bias,
      )
  
file_path: ludwig/ludwig/decoders/sequence_tagger.py
imports: import logging
  from typing import Dict
  import torch
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import HIDDEN, LOGITS, PREDICTIONS, PROBABILITIES, SEQUENCE, TEXT
  from ludwig.decoders.base import Decoder
  from ludwig.decoders.registry import register_decoder
  from ludwig.modules.attention_modules import MultiHeadSelfAttention
  from ludwig.schema.decoders.sequence_decoders import SequenceTaggerDecoderConfig
  from ludwig.utils.torch_utils import Dense
label_desc: Use image node_id 1 to create a new SequenceTaggerDecoder object from inherited base classes: Decoder with example: obj = SequenceTaggerDecoder(input_size, vocab_size, max_sequence_length, use_attention, use_bias, attention_embedding_size, attention_num_heads, decoder_config)