class_docstr: LSTM-based decoder over multiple time steps.
class_docstr_tok: ["LSTM-based","decoder","over","multiple","time","steps","."]
code: def __init__(
      self,
      hidden_size: int,
      vocab_size: int,
      max_sequence_length: int,
      reduce_input: str = "sum",
      num_layers: int = 1,
  ):
      super().__init__()
      self.hidden_size = hidden_size
      self.vocab_size = vocab_size
      self.lstm_decoder = LSTMDecoder(
          hidden_size, vocab_size, num_layers
      )
      self.max_sequence_length = max_sequence_length
      self.reduce_sequence = SequenceReducer(reduce_mode=reduce_input)
      self.num_layers = num_layers
  
      self.register_buffer(
          "logits", torch.zeros([max_sequence_length, vocab_size])
      )
      self.register_buffer(
          "decoder_input",
          torch.Tensor([strings_utils.SpecialSymbol.START.value]),
      )
  
imports: import logging
  from typing import Dict, Tuple
  import torch
  import torch.nn
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import LOGITS, PREDICTIONS, PROBABILITIES, SEQUENCE, TEXT
  from ludwig.decoders.base import Decoder
  from ludwig.decoders.registry import register_decoder
  from ludwig.decoders.sequence_decoder_utils import get_lstm_init_state, get_rnn_init_state
  from ludwig.modules.reduction_modules import SequenceReducer
  from ludwig.schema.decoders.sequence_decoders import SequenceGeneratorDecoderConfig
  from ludwig.utils import strings_utils
label_desc: Use image node_id 1 to create a new SequenceLSTMDecoder object from inherited base classes: nn with example: obj = SequenceLSTMDecoder(hidden_size, vocab_size, max_sequence_length, reduce_input, num_layers)