class_docstr: Dual-path transformer network.
  
  args:
      rnn_type (str): select from 'RNN', 'LSTM' and 'GRU'.
      input_size (int): dimension of the input feature.
          Input size must be a multiple of `att_heads`.
      hidden_size (int): dimension of the hidden state.
      output_size (int): dimension of the output size.
      att_heads (int): number of attention heads.
      dropout (float): dropout ratio. Default is 0.
      activation (str): activation function applied at the output of RNN.
      num_layers (int): number of stacked RNN layers. Default is 1.
      bidirectional (bool): whether the RNN layers are bidirectional. Default is True.
      norm_type (str): type of normalization to use after each inter- or
          intra-chunk Transformer block.
class_docstr_tok: ["Dual-path","transformer","network",".","args",":","rnn_type","(","str",")",":","select","from","'RNN","'",",","'LSTM","'","and","'GRU","'",".","input_size","(","int",")",":","dimension","of","the","input","feature",".","Input","size","must","be","a","multiple","of","`","att_heads","`",".","hidden_size","(","int",")",":","dimension","of","the","hidden","state",".","output_size","(","int",")",":","dimension","of","the","output","size",".","att_heads","(","int",")",":","number","of","attention","heads",".","dropout","(","float",")",":","dropout","ratio",".","Default","is","0.","activation","(","str",")",":","activation","function","applied","at","the","output","of","RNN",".","num_layers","(","int",")",":","number","of","stacked","RNN","layers",".","Default","is","1.","bidirectional","(","bool",")",":","whether","the","RNN","layers","are","bidirectional",".","Default","is","True",".","norm_type","(","str",")",":","type","of","normalization","to","use","after","each","inter-","or","intra-chunk","Transformer","block","."]
code: def __init__(
      self,
      rnn_type,
      input_size,
      hidden_size,
      output_size,
      att_heads=4,
      dropout=0,
      activation="relu",
      num_layers=1,
      bidirectional=True,
      norm_type="gLN",
  ):
      super().__init__()
  
      self.input_size = input_size
      self.hidden_size = hidden_size
      self.output_size = output_size
  
      # dual-path transformer
      self.row_transformer = nn.ModuleList()
      self.col_transformer = nn.ModuleList()
      for i in range(num_layers):
          self.row_transformer.append(
              ImprovedTransformerLayer(
                  rnn_type,
                  input_size,
                  att_heads,
                  hidden_size,
                  dropout=dropout,
                  activation=activation,
                  bidirectional=True,
                  norm=norm_type,
              )
          )  # intra-segment RNN is always noncausal
          self.col_transformer.append(
              ImprovedTransformerLayer(
                  rnn_type,
                  input_size,
                  att_heads,
                  hidden_size,
                  dropout=dropout,
                  activation=activation,
                  bidirectional=bidirectional,
                  norm=norm_type,
              )
          )
  
      # output layer
      self.output = nn.Sequential(
          nn.PReLU(), nn.Conv2d(input_size, output_size, 1)
      )
  
file_path: espnet/espnet2/enh/layers/dptnet.py
imports: import torch.nn
  from espnet2.enh.layers.tcn import choose_norm
  from espnet.nets.pytorch_backend.nets_utils import get_activation
label_desc: Use image node_id 1 to create a new DPTNet object from inherited base classes: nn with example: obj = DPTNet(rnn_type, input_size, hidden_size, output_size, att_heads, dropout, activation, num_layers, bidirectional, norm_type)