class_docstr: RNN Module
      
class_docstr_tok: ["RNN","Module"]
docstr: Initialize an RNN.
  :param input_dim: dimension of input
  :type input_dim: int
  :param hidden_dim: dimension of filters
  :type hidden_dim: int
  :param layer_num: number of RNN layers
  :type layer_num: int
  :param dropout_rate: dropout rate
  :type dropout_rate: float
docstr_tok: ["Initialize","an","RNN",".",":","param","input_dim",":","dimension","of","input",":","type","input_dim",":","int",":","param","hidden_dim",":","dimension","of","filters",":","type","hidden_dim",":","int",":","param","layer_num",":","number","of","RNN","layers",":","type","layer_num",":","int",":","param","dropout_rate",":","dropout","rate",":","type","dropout_rate",":","float"]
code: def __init__(self, input_dim, hidden_dim, layer_num, dropout_rate):
      """Initialize an RNN.
      :param input_dim: dimension of input
      :type input_dim: int
      :param hidden_dim: dimension of filters
      :type hidden_dim: int
      :param layer_num: number of RNN layers
      :type layer_num: int
      :param dropout_rate: dropout rate
      :type dropout_rate: float
      """
      super(RnnModel, self).__init__()
      self.rnn_layer = nn.GRU(
          input_size=input_dim,
          hidden_size=hidden_dim // 2,
          num_layers=layer_num,
          bidirectional=True,
          dropout=dropout_rate,
      )
  
imports: import os
  import logging
  import numpy
  import torch
  import torch.nn
  from torch.autograd import Variable
  from tqdm import tqdm
  from interpret_text.experimental.common.utils_introspective_rationale import generate_data
label_desc: Use image node_id 1 to create a new RnnModel object from inherited base classes: nn with example: obj = RnnModel(input_dim, hidden_dim, layer_num, dropout_rate)