class_docstr: Match texts model with Rnn and Attention.
class_docstr_tok: ["Match","texts","model","with","Rnn","and","Attention","."]
code: def __init__(self, config, **kwargs):
      super().__init__(config, **kwargs)
      logging.info("Initialize MatchRnnTextClassModel...")
  
      self.vocab_size = config["data"]["vocab_size"]
      self.num_classes = config["data"]["task"]["classes"][
          "num_classes"
      ]
  
      model_config = config["model"]["net"]["structure"]
      self.dropout_rate = model_config["dropout_rate"]
      self.embedding_size = model_config["embedding_size"]
      self.emb_trainable = model_config["emb_trainable"]
      self.lstm_num_units = model_config["lstm_num_units"]
      self.fc_num_units = model_config["fc_num_units"]
      self.l2_reg_lambda = model_config["l2_reg_lambda"]
  
      self.embed = tf.keras.layers.Embedding(
          self.vocab_size,
          self.embedding_size,
          trainable=self.emb_trainable,
          name="embdding",
          embeddings_initializer=self.embed_initializer,
      )
  
      self.embed_d = tf.keras.layers.Dropout(self.dropout_rate)
  
      self.lstm_left = tf.keras.layers.LSTM(
          self.lstm_num_units, return_sequences=True, name="lstm_left"
      )
      self.lstm_right = tf.keras.layers.LSTM(
          self.lstm_num_units, return_sequences=True, name="lstm_right"
      )
      self.concat = tf.keras.layers.Concatenate(axis=1)
  
      self.dropout = tf.keras.layers.Dropout(rate=self.dropout_rate)
      self.outlayer = tf.keras.layers.Dense(
          self.fc_num_units, activation="tanh"
      )
      self.tasktype = config["data"]["task"]["type"]
      # if self.tasktype == "Classification":
      self.final_dense = tf.keras.layers.Dense(
          self.num_classes,
          activation=tf.keras.activations.linear,
          name="final_dense",
      )
  
      logging.info("Initialize MatchRnnTextClassModel done.")
  
file_path: delta/delta/models/text_match_model.py
imports: import pickle
  from absl import logging
  import delta.compat
  from delta.layers.dynamic_pooling import DynamicPoolingLayer
  from delta.layers.match_pyramid import MatchingLayer
  from delta.models.base_model import Model
  from delta.utils.register import registers
label_desc: Use image node_id 1 to create a new MatchRnnTextClassModel object from inherited base classes: MatchRnn with example: obj = MatchRnnTextClassModel(config)