class_docstr: The Tacotron decoder
  
  Arguments
  ---------
  n_mel_channels: int
      the number of channels in the MEL sepctrogram
  n_frames_per_step:
      the number of frames in the spectrogram for each
      time step of the decoder
  encoder_embedding_dim: int
      the dimension of the encoder embedding
  attention_location_n_filters: int
      the number of filters in location-based attention
  attention_location_kernel_size: int
      the kernel size of location-based attention
  attention_rnn_dim: int
      RNN dimension for the attention layer
  decoder_rnn_dim: int
      the encoder RNN dimension
  prenet_dim: int
      the dimension of the prenet (inner and output layers)
  max_decoder_steps: int
      the maximum number of decoder steps for the longest utterance
      expected for the model
  gate_threshold: float
      the fixed threshold to which the outputs of the decoders will be compared
  p_attention_dropout: float
      dropout probability for attention layers
  
  Example
  -------
  >>> import torch
  >>> from speechbrain.lobes.models.Tacotron2 import Decoder
  >>> layer = Decoder()
  >>> memory = torch.randn(2, 173, 512)
  >>> decoder_inputs = torch.randn(2, 80, 173)
  >>> memory_lengths = torch.tensor([173, 91])
  >>> mel_outputs, gate_outputs, alignments = layer(
  ...     memory, decoder_inputs, memory_lengths)
  >>> mel_outputs.shape, gate_outputs.shape, alignments.shape
  (torch.Size([2, 80, 173]), torch.Size([2, 173]), torch.Size([2, 173, 173]))
class_docstr_tok: ["The","Tacotron","decoder","Arguments","--","--","--","--","-","n_mel_channels",":","int","the","number","of","channels","in","the","MEL","sepctrogram","n_frames_per_step",":","the","number","of","frames","in","the","spectrogram","for","each","time","step","of","the","decoder","encoder_embedding_dim",":","int","the","dimension","of","the","encoder","embedding","attention_location_n_filters",":","int","the","number","of","filters","in","location-based","attention","attention_location_kernel_size",":","int","the","kernel","size","of","location-based","attention","attention_rnn_dim",":","int","RNN","dimension","for","the","attention","layer","decoder_rnn_dim",":","int","the","encoder","RNN","dimension","prenet_dim",":","int","the","dimension","of","the","prenet","(","inner","and","output","layers",")","max_decoder_steps",":","int","the","maximum","number","of","decoder","steps","for","the","longest","utterance","expected","for","the","model","gate_threshold",":","float","the","fixed","threshold","to","which","the","outputs","of","the","decoders","will","be","compared","p_attention_dropout",":","float","dropout","probability","for","attention","layers","Example","--","--","--","-",">",">",">","import","torch",">",">",">","from","speechbrain.lobes.models.Tacotron2","import","Decoder",">",">",">","layer","=","Decoder","(",")",">",">",">","memory","=","torch.randn","(","2",",","173",",","512",")",">",">",">","decoder_inputs","=","torch.randn","(","2",",","80",",","173",")",">",">",">","memory_lengths","=","torch.tensor","(","[","173",",","91","]",")",">",">",">","mel_outputs",",","gate_outputs",",","alignments","=","layer","(","...","memory",",","decoder_inputs",",","memory_lengths",")",">",">",">","mel_outputs.shape",",","gate_outputs.shape",",","alignments.shape","(","torch.Size","(","[","2",",","80",",","173","]",")",",","torch.Size","(","[","2",",","173","]",")",",","torch.Size","(","[","2",",","173",",","173","]",")",")"]
docstr: Gets all zeros frames to use as first decoder input
  
  Arguments
  ---------
  memory: torch.Tensor
      decoder outputs
  
  Returns
  -------
  decoder_input: torch.Tensor
      all zeros frames
docstr_tok: ["Gets","all","zeros","frames","to","use","as","first","decoder","input","Arguments","--","--","--","--","-","memory",":","torch.Tensor","decoder","outputs","Returns","--","--","--","-","decoder_input",":","torch.Tensor","all","zeros","frames"]
code: def get_go_frame(self, memory):
      """Gets all zeros frames to use as first decoder input
  
      Arguments
      ---------
      memory: torch.Tensor
          decoder outputs
  
      Returns
      -------
      decoder_input: torch.Tensor
          all zeros frames
      """
      B = memory.size(0)
      dtype = memory.dtype
      device = memory.device
      decoder_input = torch.zeros(
          B,
          self.n_mel_channels * self.n_frames_per_step,
          dtype=dtype,
          device=device,
      )
      return decoder_input
  
imports: from math import sqrt
  from speechbrain.nnet.loss.guidedattn_loss import GuidedAttentionLoss
  from speechbrain.lobes.models.transformer.Transformer import get_mask_from_lengths
  import torch
  from torch import nn
  from torch.nn import functional
  from collections import namedtuple
label_desc: Use image node_id 2 for calling the Decoder obj's underlying member method code with example usage: obj.get_go_frame(memory) and returns: decoder_input