class_docstr: Applies a multi-layer Elman RNN with :math:`    anh` or :math:` ext{ReLU}` non-linearity to an
  input sequence.
  
  DP-friendly drop-in replacement of the ``torch.nn.RNN`` module.
  Refer to ``torch.nn.RNN`` documentation for the model description, parameters and inputs/outputs.
  
  After training this module can be exported and loaded by the original ``torch.nn`` implementation for inference.
class_docstr_tok: ["Applies","a","multi-layer","Elman","RNN","with",":","math",":","`","anh","`","or",":","math",":","`","ext","{","ReLU","}","`","non-linearity","to","an","input","sequence",".","DP-friendly","drop-in","replacement","of","the","``","torch.nn.RNN","``","module",".","Refer","to","``","torch.nn.RNN","``","documentation","for","the","model","description",",","parameters","and","inputs\/outputs",".","After","training","this","module","can","be","exported","and","loaded","by","the","original","``","torch.nn","``","implementation","for","inference","."]
code: def __init__(
      self,
      input_size: int,
      hidden_size: int,
      num_layers: int = 1,
      bias: bool = True,
      batch_first: bool = False,
      dropout: float = 0,
      bidirectional: bool = False,
      proj_size: int = 0,
      nonlinearity: str = "tanh",
  ) -> None:
      super().__init__(
          DPRNNCell,
          input_size,
          hidden_size,
          num_layers=num_layers,
          bias=bias,
          batch_first=batch_first,
          dropout=dropout,
          bidirectional=bidirectional,
          proj_size=proj_size,
          cell_params={"nonlinearity": nonlinearity},
      )
  
imports: import math
  import numbers
  import warnings
  from typing import List, Optional, Tuple, Type, Union
  import torch
  import torch.nn
  from torch import Tensor
  from torch.nn.utils.rnn import PackedSequence
  from ..utils.packed_sequences import compute_seq_lengths
  from .param_rename import RenameParamsMixin
label_desc: Use image node_id 1 to create a new DPRNN object from inherited base classes: DPRNNBase with example: obj = DPRNN(input_size, hidden_size, num_layers, bias, batch_first, dropout, bidirectional, proj_size, nonlinearity)