class_docstr: Tacotron decoder.
  
  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_windowing (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.
      d_vector_dim (int): size of speaker embedding vector, for multi-speaker training.
      max_decoder_steps (int): Maximum number of steps allowed for the decoder. Defaults to 500.
class_docstr_tok: ["Tacotron","decoder",".","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_windowing","(","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",".","d_vector_dim","(","int",")",":","size","of","speaker","embedding","vector",",","for","multi-speaker","training",".","max_decoder_steps","(","int",")",":","Maximum","number","of","steps","allowed","for","the","decoder",".","Defaults","to","500","."]
code: def decode(self, inputs, mask=None):
      # Prenet
      processed_memory = self.prenet(self.memory_input)
      # Attention RNN
      self.attention_rnn_hidden = self.attention_rnn(
          torch.cat((processed_memory, self.context_vec), -1),
          self.attention_rnn_hidden,
      )
      self.context_vec = self.attention(
          self.attention_rnn_hidden, inputs, self.processed_inputs, mask
      )
      # Concat RNN output and attention context vector
      decoder_input = self.project_to_decoder_in(
          torch.cat((self.attention_rnn_hidden, self.context_vec), -1)
      )
  
      # Pass through the decoder RNNs
      for idx, decoder_rnn in enumerate(self.decoder_rnns):
          self.decoder_rnn_hiddens[idx] = decoder_rnn(
              decoder_input, self.decoder_rnn_hiddens[idx]
          )
          # Residual connection
          decoder_input = self.decoder_rnn_hiddens[idx] + decoder_input
      decoder_output = decoder_input
  
      # predict mel vectors from decoder vectors
      output = self.proj_to_mel(decoder_output)
      # output = torch.sigmoid(output)
      # predict stop token
      stopnet_input = torch.cat([decoder_output, output], -1)
      if self.separate_stopnet:
          stop_token = self.stopnet(stopnet_input.detach())
      else:
          stop_token = self.stopnet(stopnet_input)
      output = output[:, : self.r * self.frame_channels]
      return output, stop_token, self.attention.attention_weights
  
imports: import torch
  from torch import nn
  from .attentions import init_attn
  from .common_layers import Prenet
label_desc: Use image node_id 6 for calling the Decoder obj's underlying member method code with example usage: obj.decode(inputs, mask) and returns: output,  stop_token,  self