class_docstr: Tacotron2 Encoder
  
  Args:
      in_out_channels (int): number of input and output channels.
  
  Shapes:
      - input: (B, C_in, T)
      - output: (B, C_in, T)
code: def forward(self, x, input_lengths):
      o = x
      for layer in self.convolutions:
          o = layer(o)
      o = o.transpose(1, 2)
      o = nn.utils.rnn.pack_padded_sequence(
          o, input_lengths.cpu(), batch_first=True
      )
      self.lstm.flatten_parameters()
      o, _ = self.lstm(o)
      o, _ = nn.utils.rnn.pad_packed_sequence(o, batch_first=True)
      return o
  
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 2 for calling the Encoder obj's underlying member method code with example usage: obj.forward(x, input_lengths) and returns: o