class_docstr: Tacotron2 decoder. We don't use Zoneout but Dropout between RNN layers.
  
  Args:
      in_channels (int): number of input channels.
      frame_channels (int): number of feature frame channels.
      r (int): number of outputs per time step (reduction rate).
      memory_size (int): size of the past window. if <= 0 memory_size = r
      attn_type (string): type of attention used in decoder.
      attn_win (bool): if true, define an attention window centered to maximum
          attention response. It provides more robust attention alignment especially
          at interence time.
      attn_norm (string): attention normalization function. 'sigmoid' or 'softmax'.
      prenet_type (string): 'original' or 'bn'.
      prenet_dropout (float): prenet dropout rate.
      forward_attn (bool): if true, use forward attention method. https://arxiv.org/abs/1807.06736
      trans_agent (bool): if true, use transition agent. https://arxiv.org/abs/1807.06736
      forward_attn_mask (bool): if true, mask attention values smaller than a threshold.
      location_attn (bool): if true, use location sensitive attention.
      attn_K (int): number of attention heads for GravesAttention.
      separate_stopnet (bool): if true, detach stopnet input to prevent gradient flow.
      max_decoder_steps (int): Maximum number of steps allowed for the decoder. Defaults to 10000.
code: def _init_states(self, inputs, mask, keep_states=False):
      B = inputs.size(0)
      # T = inputs.size(1)
      if not keep_states:
          self.query = torch.zeros(1, device=inputs.device).repeat(
              B, self.query_dim
          )
          self.attention_rnn_cell_state = torch.zeros(
              1, device=inputs.device
          ).repeat(B, self.query_dim)
          self.decoder_hidden = torch.zeros(
              1, device=inputs.device
          ).repeat(B, self.decoder_rnn_dim)
          self.decoder_cell = torch.zeros(
              1, device=inputs.device
          ).repeat(B, self.decoder_rnn_dim)
          self.context = torch.zeros(1, device=inputs.device).repeat(
              B, self.encoder_embedding_dim
          )
      self.inputs = inputs
      self.processed_inputs = self.attention.preprocess_inputs(inputs)
      self.mask = mask
  
imports: import torch
  from torch import nn
  from torch.nn import functional
  from .attentions import init_attn
  from .common_layers import Linear, Prenet
label_desc: Use image node_id 4 for calling the Decoder obj's underlying member method code with example usage: obj._init_states(inputs, mask, keep_states) without return types