docstr: Prepares decoder outputs for output
  PARAMS
  ------
  mel_outputs:
  gate_outputs: gate output energies
  alignments:
  
  RETURNS
  -------
  mel_outputs:
  gate_outpust: gate output energies
  alignments:
docstr_tok: ["Prepares","decoder","outputs","for","output","PARAMS","--","--","--","mel_outputs",":","gate_outputs",":","gate","output","energies","alignments",":","RETURNS","--","--","--","-","mel_outputs",":","gate_outpust",":","gate","output","energies","alignments",":"]
code: def parse_decoder_outputs(
      self, mel_outputs, gate_outputs, alignments
  ):
      """Prepares decoder outputs for output
      PARAMS
      ------
      mel_outputs:
      gate_outputs: gate output energies
      alignments:
  
      RETURNS
      -------
      mel_outputs:
      gate_outpust: gate output energies
      alignments:
      """
      # (T_out, B) -> (B, T_out)
      alignments = torch.stack(alignments).transpose(0, 1)
      # (T_out, B) -> (B, T_out)
      gate_outputs = torch.stack(gate_outputs).transpose(0, 1)
      gate_outputs = gate_outputs.contiguous()
      # (T_out, B, n_mel_channels) -> (B, T_out, n_mel_channels)
      mel_outputs = (
          torch.stack(mel_outputs).transpose(0, 1).contiguous()
      )
      # decouple frames per step
      mel_outputs = mel_outputs.view(
          mel_outputs.size(0), -1, self.n_mel_channels
      )
      # (B, T_out, n_mel_channels) -> (B, n_mel_channels, T_out)
      mel_outputs = mel_outputs.transpose(1, 2)
  
      return mel_outputs, gate_outputs, alignments
  
imports: from math import sqrt
  import torch
  import torch.distributions
  from torch.autograd import Variable
  from torch import nn
  from torch.nn import functional
  from .layers import ConvNorm, LinearNorm, GlobalAvgPool
  from .utils import to_gpu, get_mask_from_lengths
label_desc: Use image node_id 5 for calling the Decoder obj's underlying member method code with example usage: obj.parse_decoder_outputs(mel_outputs, gate_outputs, alignments) and returns: mel_outputs,  gate_outputs,  alignments