class_docstr: An Elman RNN cell with tanh or ReLU non-linearity.
  
  DP-friendly drop-in replacement of the ``torch.nn.RNNCell`` module to use in ``DPRNN``.
  Refer to ``torch.nn.RNNCell`` documentation for the model description, parameters and inputs/outputs.
class_docstr_tok: ["An","Elman","RNN","cell","with","tanh","or","ReLU","non-linearity",".","DP-friendly","drop-in","replacement","of","the","``","torch.nn.RNNCell","``","module","to","use","in","``","DPRNN","``",".","Refer","to","``","torch.nn.RNNCell","``","documentation","for","the","model","description",",","parameters","and","inputs\/outputs","."]
code: def __init__(
      self,
      input_size: int,
      hidden_size: int,
      bias: bool,
      nonlinearity: str = "tanh",
  ) -> None:
      super().__init__(input_size, hidden_size, bias, num_chunks=1)
      if nonlinearity not in ("tanh", "relu"):
          raise ValueError(f"Unsupported nonlinearity: {nonlinearity}")
      self.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 DPRNNCell object from inherited base classes: DPRNNCellBase with example: obj = DPRNNCell(input_size, hidden_size, bias, nonlinearity)