class_docstr: Rationale generator module
      
class_docstr_tok: ["Rationale","generator","module"]
docstr: :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 of RNN
  :type dropout_rate: float
docstr_tok: [":","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","of","RNN",":","type","dropout_rate",":","float"]
code: def __init__(self, input_dim, hidden_dim, layer_num, dropout_rate):
      """
      :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 of RNN
      :type dropout_rate: float
      """
      super(DepGenerator, self).__init__()
  
      self.generator_model = RnnModel(
          input_dim, hidden_dim, layer_num, dropout_rate
      )
      # rationale has dimension (num_tokens, 2)
      self.output_layer = nn.Linear(hidden_dim, 2)
  
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 DepGenerator object from inherited base classes: nn with example: obj = DepGenerator(input_dim, hidden_dim, layer_num, dropout_rate)