docstr: Args:
      input_size: dimention of input embedding
      hidden_size: hidden size
      dropout: dropout layer on the outputs of each RNN layer except the last layer
      bidirectional: if it is a bidirectional RNN
      num_layers: number of recurrent layers
      activation_function: the activation function of RNN, tanh/relu
docstr_tok: ["Args",":","input_size",":","dimention","of","input","embedding","hidden_size",":","hidden","size","dropout",":","dropout","layer","on","the","outputs","of","each","RNN","layer","except","the","last","layer","bidirectional",":","if","it","is","a","bidirectional","RNN","num_layers",":","number","of","recurrent","layers","activation_function",":","the","activation","function","of","RNN",",","tanh\/relu"]
code: def __init__(
      self,
      input_size=50,
      hidden_size=256,
      dropout=0,
      bidirectional=False,
      num_layers=1,
      activation_function="tanh",
  ):
      """
      Args:
          input_size: dimention of input embedding
          hidden_size: hidden size
          dropout: dropout layer on the outputs of each RNN layer except the last layer
          bidirectional: if it is a bidirectional RNN
          num_layers: number of recurrent layers
          activation_function: the activation function of RNN, tanh/relu
      """
      super().__init__()
      if bidirectional:
          hidden_size /= 2
      self.rnn = nn.RNN(
          input_size,
          hidden_size,
          num_layers,
          nonlinearity=activation_function,
          dropout=dropout,
          bidirectional=bidirectional,
      )
  
imports: import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new RNN object from inherited base classes: nn with example: obj = RNN(input_size, hidden_size, dropout, bidirectional, num_layers, activation_function)