docstr:     Treat batch_size dimension and num dimension as one batch_size dimension
      (batch_size * num).
  :param input:  <batch_size, num, time_step, input_dim>
  :param num: the number of input time series data. For short term data, the num is 1.
  :return: the embedded of the input <batch_size, num, last_rnn_hid_size>
docstr_tok: ["Treat","batch_size","dimension","and","num","dimension","as","one","batch_size","dimension","(","batch_size","*","num",")",".",":","param","input",":","<","batch_size",",","num",",","time_step",",","input_dim",">",":","param","num",":","the","number","of","input","time","series","data",".","For","short","term","data",",","the","num","is","1.",":","return",":","the","embedded","of","the","input","<","batch_size",",","num",",","last_rnn_hid_size",">"]
code: def __encoder(self, input, num, name="Encoder", training=None):
      """
          Treat batch_size dimension and num dimension as one batch_size dimension
          (batch_size * num).
      :param input:  <batch_size, num, time_step, input_dim>
      :param num: the number of input time series data. For short term data, the num is 1.
      :return: the embedded of the input <batch_size, num, last_rnn_hid_size>
      """
      # input = Input(shape=(num, self.time_step, self.feature_num))
      batch_size_new = self.batch_size * num
      Tc = self.time_step - self.cnn_height + 1
  
      # CNN
      # reshaped input: (batch_size_new, time_step, feature_num, 1)
      reshaped_input = Lambda(
          lambda x: K.reshape(
              x,
              (-1, self.time_step, self.feature_num, 1),
          ),
          name=name + "reshape_cnn",
      )(input)
      # output: <batch_size_new, conv_out, 1, en_conv_hidden_size>
      cnn_out = Conv2D(
          filters=self.cnn_hid_size,
          kernel_size=(self.cnn_height, self.feature_num),
          padding="valid",
          kernel_initializer=TruncatedNormal(stddev=0.1),
          bias_initializer=Constant(0.1),
          activation="relu",
      )(reshaped_input)
      cnn_out = Dropout(self.cnn_dropout)(cnn_out, training=training)
  
      rnn_input = Lambda(
          lambda x: K.reshape(x, (-1, num, Tc, self.cnn_hid_size)),
      )(cnn_out)
  
      # use AttentionRNNWrapper
      rnn_cells = [
          GRUCell(h_size, activation="relu", dropout=self.rnn_dropout)
          for h_size in self.rnn_hid_sizes
      ]
  
      attention_rnn = AttentionRNNWrapper(
          RNN(rnn_cells), weight_initializer=TruncatedNormal(stddev=0.1)
      )
  
      outputs = []
      for i in range(num):
          input_i = rnn_input[:, i]
          # input_i = (batch, conv_hid_size, Tc)
          input_i = Permute(
              (2, 1), input_shape=[Tc, self.cnn_hid_size]
          )(input_i)
          # output = (batch, last_rnn_hid_size)
          output_i = attention_rnn(input_i, training=training)
          # output = (batch, 1, last_rnn_hid_size)
          output_i = Reshape((1, -1))(output_i)
          outputs.append(output_i)
      if len(outputs) > 1:
          output = Lambda(lambda x: concatenate(x, axis=1))(outputs)
      else:
          output = outputs[0]
      return output
  
imports: import pickle
  import numpy
  import time
  from tensorflow.keras.models import Model
  from tensorflow.keras.layers import *
  from tensorflow.keras.initializers import TruncatedNormal, Constant
  import tensorflow.keras.backend
  import tensorflow
  from zoo.orca.automl.metrics import Evaluator
  from zoo.orca.automl.model.abstract import BaseModel
label_desc: Use image node_id 5 for calling the MTNetKeras obj's underlying member method code with example usage: obj.__encoder(input, num, name, training) and returns: output