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 forward(self, input):
      # input shape: batch, N, dim1, dim2
      # apply RNN on dim1 first and then dim2
      # output shape: B, output_size, dim1, dim2
      # input = input.to(device)
      batch_size, _, dim1, dim2 = input.shape
      output = input
      for i in range(len(self.row_rnn)):
          row_input = (
              output.permute(0, 3, 2, 1)
              .contiguous()
              .view(batch_size * dim2, dim1, -1)
          )  # B*dim2, dim1, N
          row_output, _ = self.row_rnn[i](row_input)  # B*dim2, dim1, H
          row_output = (
              row_output.view(batch_size, dim2, dim1, -1)
              .permute(0, 3, 2, 1)
              .contiguous()
          )  # B, N, dim1, dim2
          row_output = self.row_norm[i](row_output)
          output = output + row_output
  
          col_input = (
              output.permute(0, 2, 3, 1)
              .contiguous()
              .view(batch_size * dim1, dim2, -1)
          )  # B*dim1, dim2, N
          col_output, _ = self.col_rnn[i](col_input)  # B*dim1, dim2, H
          col_output = (
              col_output.view(batch_size, dim1, dim2, -1)
              .permute(0, 3, 1, 2)
              .contiguous()
          )  # B, N, dim1, dim2
          col_output = self.col_norm[i](col_output)
          output = output + col_output
  
      output = self.output(output)  # B, output_size, dim1, dim2
  
      return output
  
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 2 for calling the DPRNN obj's underlying member method code with example usage: obj.forward(input) and returns: output