class_docstr: GRU or RNN-based decoder.
class_docstr_tok: ["GRU","or","RNN-based","decoder","."]
docstr: Runs a single decoding time step.
  
  Modeled off of https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html.
  
  Args:
      input: [batch_size] tensor with the previous step's predicted symbol.
      hidden: [batch_size, hidden_size] tensor with the previous step's hidden state.
  
  Returns:
      Tuple of two tensors:
      - output: [batch_size, 1, vocab_size] tensor with the logits.
      - hidden: [num_layers, batch_size, hidden_size] tensor with the hidden state for the next time step.
docstr_tok: ["Runs","a","single","decoding","time","step",".","Modeled","off","of","https",":","\/\/pytorch.org\/tutorials\/intermediate\/seq2seq_translation_tutorial.html",".","Args",":","input",":","[","batch_size","]","tensor","with","the","previous","step","'s","predicted","symbol",".","hidden",":","[","batch_size",",","hidden_size","]","tensor","with","the","previous","step","'s","hidden","state",".","Returns",":","Tuple","of","two","tensors",":","-","output",":","[","batch_size",",","1",",","vocab_size","]","tensor","with","the","logits",".","-","hidden",":","[","num_layers",",","batch_size",",","hidden_size","]","tensor","with","the","hidden","state","for","the","next","time","step","."]
code: def forward(
      self, input: torch.Tensor, hidden: torch.Tensor
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      """Runs a single decoding time step.
  
      Modeled off of https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html.
  
      Args:
          input: [batch_size] tensor with the previous step's predicted symbol.
          hidden: [batch_size, hidden_size] tensor with the previous step's hidden state.
  
      Returns:
          Tuple of two tensors:
          - output: [batch_size, 1, vocab_size] tensor with the logits.
          - hidden: [num_layers, batch_size, hidden_size] tensor with the hidden state for the next time step.
      """
      # Unsqueeze predicted tokens.
      input = input.unsqueeze(1).to(torch.int)
      output = self.embedding(input)
      output, hidden = self.rnn(output, hidden)
      output_logits = self.out(output)
      return output_logits, hidden
  
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 2 for calling the RNNDecoder obj's underlying member method code with example usage: obj.forward(input, hidden) and returns: output_logits,  hidden