code: def encode(self,
                 data: mx.sym.Symbol,
                 data_length: mx.sym.Symbol,
                 seq_len: int) -> Tuple[mx.sym.Symbol, mx.sym.Symbol, int]:
          
          # data: (batch_size, seq_len, num_hidden)
          data = mx.sym.FullyConnected(data=data,
                                       num_hidden=self.config.cnn_config.num_hidden,
                                       no_bias=True,
                                       flatten=False,
                                       weight=self.i2h_weight)
  
          # Multiple layers with residual connections:
          for layer in self.layers:
              data = data + layer(data, data_length, seq_len)
          return data, data_length, seq_len
docs: Encodes data with a stack of Convolution+GLU blocks given sequence lengths of individual examples
          and maximum sequence length.
  
          :param data: Input data. Shape: (batch_size, seq_len, input_num_hidden).
          :param data_length: Vector with sequence lengths.
          :param seq_len: Maximum sequence length.
          :return: Encoded version of the data.