class_docstr: LSTM decoder.
  
  Attributes:
    init_state: [batch_size, hidden_size]
      Initial state of the decoder (i.e., the final state of the encoder).
    teacher_force: See docstring on Seq2seq module.
    vocab_size: Size of the vocabulary.
class_docstr_tok: ["LSTM","decoder",".","Attributes",":","init_state",":","[","batch_size",",","hidden_size","]","Initial","state","of","the","decoder","(","i.e.",",","the","final","state","of","the","encoder",")",".","teacher_force",":","See","docstring","on","Seq2seq","module",".","vocab_size",":","Size","of","the","vocabulary","."]
docstr: Applies the decoder model.
  
  Args:
    inputs: [batch_size, max_output_len-1, vocab_size]
      Contains the inputs to the decoder at each time step (only used when not
      using teacher forcing). Since each token at position i is fed as input
      to the decoder at position i+1, the last token is not provided.
  
  Returns:
    Pair (logits, predictions), which are two arrays of respectively decoded
    logits and predictions (in one hot-encoding format).
docstr_tok: ["Applies","the","decoder","model",".","Args",":","inputs",":","[","batch_size",",","max_output_len-1",",","vocab_size","]","Contains","the","inputs","to","the","decoder","at","each","time","step","(","only","used","when","not","using","teacher","forcing",")",".","Since","each","token","at","position","i","is","fed","as","input","to","the","decoder","at","position","i+1",",","the","last","token","is","not","provided",".","Returns",":","Pair","(","logits",",","predictions",")",",","which","are","two","arrays","of","respectively","decoded","logits","and","predictions","(","in","one","hot-encoding","format",")","."]
code: def __call__(self, inputs: Array) -> tuple[Array, Array]:
      """Applies the decoder model.
  
      Args:
        inputs: [batch_size, max_output_len-1, vocab_size]
          Contains the inputs to the decoder at each time step (only used when not
          using teacher forcing). Since each token at position i is fed as input
          to the decoder at position i+1, the last token is not provided.
  
      Returns:
        Pair (logits, predictions), which are two arrays of respectively decoded
        logits and predictions (in one hot-encoding format).
      """
      lstm = DecoderLSTM(
          teacher_force=self.teacher_force, vocab_size=self.vocab_size
      )
      init_carry = (self.init_state, inputs[:, 0])
      _, (logits, predictions) = lstm(init_carry, inputs)
      return logits, predictions
  
imports: import functools
  from typing import Any
  from flax import linen
  import jax
  import jax.numpy
  import numpy
label_desc: Use image node_id 1 for calling the Decoder obj's underlying member method code with example usage: obj.__call__(inputs) and returns: logits,  predictions