class_docstr: Applies a multi-layer Elman RNN with `tanh` or `ReLU` non-linearity to an
  input sequence.
code: def __init__(self, *args, **kwargs):
      if "proj_size" in kwargs:
          raise ValueError(
              "proj_size argument is only supported for LSTM, not RNN or GRU"
          )
      if "nonlinearity" in kwargs:
          if kwargs["nonlinearity"] == "tanh":
              mode = "RNN_TANH"
          elif kwargs["nonlinearity"] == "relu":
              mode = "RNN_RELU"
          else:
              raise ValueError(
                  "Unknown nonlinearity '{}'".format(
                      kwargs["nonlinearity"]
                  )
              )
          del kwargs["nonlinearity"]
      else:
          mode = "RNN_TANH"
  
      super(QuantRNN, self).__init__(mode, *args, **kwargs)
  
imports: import math
  import torch
  import warnings
  import itertools
  import numbers
  from torch import nn
  from torch.nn import Parameter
  from torch.nn.utils.rnn import PackedSequence
  from lightseq.training.pytorch_quantization import tensor_quant
  from lightseq.training.pytorch_quantization.nn._functions import quant_rnn
  from .None import _utils
label_desc: Use image node_id 1 to create a new QuantRNN object from inherited base classes: QuantRNNBase with example: obj = QuantRNN()