class_docstr: A single RNNLayer with optional batch norm.
class_docstr_tok: ["A","single","RNNLayer","with","optional","batch","norm","."]
code: def __init__(
      self,
      input_size: int,
      hidden_size: int,
      rnn_type: torch.nn.Module = torch.nn.LSTM,
      batch_norm: bool = True,
      forget_gate_bias: Optional[float] = 1.0,
      t_max: Optional[int] = None,
      weights_init_scale: float = 1.0,
      hidden_hidden_bias_scale: float = 0.0,
      proj_size: int = 0,
  ):
      super().__init__()
  
      if batch_norm:
          self.bn = OverLastDim(torch.nn.BatchNorm1d(input_size))
  
      if isinstance(rnn_type, torch.nn.LSTM) and not batch_norm:
          # batch_norm will apply bias, no need to add a second to LSTM
          self.rnn = LSTMDropout(
              input_size=input_size,
              hidden_size=hidden_size,
              num_layers=1,
              dropout=0.0,
              forget_gate_bias=forget_gate_bias,
              t_max=t_max,
              weights_init_scale=weights_init_scale,
              hidden_hidden_bias_scale=hidden_hidden_bias_scale,
              proj_size=proj_size,
          )
      else:
          self.rnn = rnn_type(
              input_size=input_size,
              hidden_size=hidden_size,
              bias=not batch_norm,
          )
  
imports: import math
  from typing import List, Optional, Tuple, Union
  import numpy
  import torch
  from nemo.utils import logging
label_desc: Use image node_id 1 to create a new RNNLayer object from inherited base classes: torch.nn with example: obj = RNNLayer(input_size, hidden_size, rnn_type, batch_norm, forget_gate_bias, t_max, weights_init_scale, hidden_hidden_bias_scale, proj_size)