class_docstr: RNN model for text classification.
class_docstr_tok: ["RNN","model","for","text","classification","."]
code: def __init__(self, config, **kwargs):
      super(RnnAttentionModel, self).__init__(config, **kwargs)
  
      logging.info("Initialize RnnAttentionModel...")
  
      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.num_layers = model_config["num_layers"]
      self.l2_reg_lambda = model_config["l2_reg_lambda"]
      self.batch_size = model_config["batch_size"]
      self.max_len = model_config["max_len"]
  
      self.embed = tf.keras.layers.Embedding(
          self.vocab_size,
          self.embedding_size,
          embeddings_initializer=self.embed_initializer,
      )
  
      self.embed_d = tf.keras.layers.Dropout(self.dropout_rate)
      self.encoder = layers.RnnAttentionEncoder(config, name="encoder")
      self.final_dense = tf.keras.layers.Dense(
          self.num_classes,
          activation=tf.keras.activations.linear,
          name="final_dense",
      )
      logging.info("Initialize RnnAttentionModel done.")
  
imports: import pickle
  import delta.compat
  from absl import logging
  from delta import layers
  from delta.models.text_cls_model import TextClassModel
  from delta.utils.register import registers
  from delta import utils
label_desc: Use image node_id 1 to create a new RnnAttentionModel object from inherited base classes: SeqclassModel with example: obj = RnnAttentionModel(config)