class_docstr: NN module creating a fixed size prosody embedding from a spectrogram.
  
  inputs: mel spectrograms [batch_size, num_spec_frames, num_mel]
  outputs: [batch_size, embedding_dim]
class_docstr_tok: ["NN","module","creating","a","fixed","size","prosody","embedding","from","a","spectrogram",".","inputs",":","mel","spectrograms","[","batch_size",",","num_spec_frames",",","num_mel","]","outputs",":","[","batch_size",",","embedding_dim","]"]
code: def forward(self, inputs):
      batch_size = inputs.size(0)
      x = inputs.view(batch_size, 1, -1, self.num_mel)
      # x: 4D tensor [batch_size, num_channels==1, num_frames, num_mel]
      for conv, bn in zip(self.convs, self.bns):
          x = conv(x)
          x = bn(x)
          x = F.relu(x)
  
      x = x.transpose(1, 2)
      # x: 4D tensor [batch_size, post_conv_width,
      #               num_channels==128, post_conv_height]
      post_conv_width = x.size(1)
      x = x.contiguous().view(batch_size, post_conv_width, -1)
      # x: 3D tensor [batch_size, post_conv_width,
      #               num_channels*post_conv_height]
      self.recurrence.flatten_parameters()
      _, out = self.recurrence(x)
      # out: 3D tensor [seq_len==1, batch_size, encoding_size=128]
  
      return out.squeeze(0)
  
file_path: TTS/TTS/tts/layers/tacotron/gst_layers.py
imports: import torch
  import torch.nn.functional
  from torch import nn
label_desc: Use image node_id 2 for calling the ReferenceEncoder obj's underlying member method code with example usage: obj.forward(inputs) and returns: out