class_docstr: Deep dual-path RNN.
  
  args:
      rnn_type: string, select from 'RNN', 'LSTM' and 'GRU'.
      input_size: int, dimension of the input feature. The input should have shape
                  (batch, seq_len, input_size).
      hidden_size: int, dimension of the hidden state.
      output_size: int, dimension of the output size.
      dropout: float, dropout ratio. Default is 0.
      num_layers: int, number of stacked RNN layers. Default is 1.
      bidirectional: bool, whether the RNN layers are bidirectional. Default is True.
class_docstr_tok: ["Deep","dual-path","RNN",".","args",":","rnn_type",":","string",",","select","from","'RNN","'",",","'LSTM","'","and","'GRU","'",".","input_size",":","int",",","dimension","of","the","input","feature",".","The","input","should","have","shape","(","batch",",","seq_len",",","input_size",")",".","hidden_size",":","int",",","dimension","of","the","hidden","state",".","output_size",":","int",",","dimension","of","the","output","size",".","dropout",":","float",",","dropout","ratio",".","Default","is","0.","num_layers",":","int",",","number","of","stacked","RNN","layers",".","Default","is","1.","bidirectional",":","bool",",","whether","the","RNN","layers","are","bidirectional",".","Default","is","True","."]
code: def __init__(
      self,
      rnn_type,
      input_size,
      hidden_size,
      output_size,
      dropout=0,
      num_layers=1,
      bidirectional=True,
  ):
      super().__init__()
  
      self.input_size = input_size
      self.output_size = output_size
      self.hidden_size = hidden_size
  
      # dual-path RNN
      self.row_rnn = nn.ModuleList([])
      self.col_rnn = nn.ModuleList([])
      self.row_norm = nn.ModuleList([])
      self.col_norm = nn.ModuleList([])
      for i in range(num_layers):
          self.row_rnn.append(
              SingleRNN(
                  rnn_type,
                  input_size,
                  hidden_size,
                  dropout,
                  bidirectional=True,
              )
          )  # intra-segment RNN is always noncausal
          self.col_rnn.append(
              SingleRNN(
                  rnn_type,
                  input_size,
                  hidden_size,
                  dropout,
                  bidirectional=bidirectional,
              )
          )
          self.row_norm.append(nn.GroupNorm(1, input_size, eps=1e-8))
          # default is to use noncausal LayerNorm for inter-chunk RNN.
          # For causal setting change it to causal normalization accordingly.
          self.col_norm.append(nn.GroupNorm(1, input_size, eps=1e-8))
  
      # output layer
      self.output = nn.Sequential(
          nn.PReLU(), nn.Conv2d(input_size, output_size, 1)
      )
  
file_path: espnet/espnet2/enh/layers/dprnn.py
imports: import torch
  import torch.nn
  from torch.autograd import Variable
label_desc: Use image node_id 1 to create a new DPRNN object from inherited base classes: nn with example: obj = DPRNN(rnn_type, input_size, hidden_size, output_size, dropout, num_layers, bidirectional)