class_docstr: Skipping Memory Net
  
  args:
      input_size: int, dimension of the input feature.
          Input shape shoud be (batch, length, 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_blocks: number of basic SkiM blocks
      segment_size: segmentation size for splitting long features
      bidirectional: bool, whether the RNN layers are bidirectional.
      mem_type: 'hc', 'h', 'c', 'id' or None.
          It controls whether the hidden (or cell) state of SegLSTM
          will be processed by MemLSTM.
          In 'id' mode, both the hidden and cell states will
          be identically returned.
          When mem_type is None, the MemLSTM will be removed.
      norm_type: gLN, cLN. cLN is for causal implementation.
      seg_overlap: Bool, whether the segmentation will reserve 50%
          overlap for adjacent segments.Default is False.
class_docstr_tok: ["Skipping","Memory","Net","args",":","input_size",":","int",",","dimension","of","the","input","feature",".","Input","shape","shoud","be","(","batch",",","length",",","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_blocks",":","number","of","basic","SkiM","blocks","segment_size",":","segmentation","size","for","splitting","long","features","bidirectional",":","bool",",","whether","the","RNN","layers","are","bidirectional",".","mem_type",":","'hc","'",",","'","h","'",",","'","c","'",",","'id","'","or","None",".","It","controls","whether","the","hidden","(","or","cell",")","state","of","SegLSTM","will","be","processed","by","MemLSTM",".","In","'id","'","mode",",","both","the","hidden","and","cell","states","will","be","identically","returned",".","When","mem_type","is","None",",","the","MemLSTM","will","be","removed",".","norm_type",":","gLN",",","cLN",".","cLN","is","for","causal","implementation",".","seg_overlap",":","Bool",",","whether","the","segmentation","will","reserve","50","%","overlap","for","adjacent","segments.Default","is","False","."]
code: def __init__(
      self,
      input_size,
      hidden_size,
      output_size,
      dropout=0.0,
      num_blocks=2,
      segment_size=20,
      bidirectional=True,
      mem_type="hc",
      norm_type="gLN",
      seg_overlap=False,
  ):
      super().__init__()
      self.input_size = input_size
      self.output_size = output_size
      self.hidden_size = hidden_size
      self.segment_size = segment_size
      self.dropout = dropout
      self.num_blocks = num_blocks
      self.mem_type = mem_type
      self.norm_type = norm_type
      self.seg_overlap = seg_overlap
  
      assert mem_type in [
          "hc",
          "h",
          "c",
          "id",
          None,
      ], f"only support 'hc', 'h', 'c', 'id', and None, current type: {mem_type}"
  
      self.seg_lstms = nn.ModuleList([])
      for i in range(num_blocks):
          self.seg_lstms.append(
              SegLSTM(
                  input_size=input_size,
                  hidden_size=hidden_size,
                  dropout=dropout,
                  bidirectional=bidirectional,
                  norm_type=norm_type,
              )
          )
      if self.mem_type is not None:
          self.mem_lstms = nn.ModuleList([])
          for i in range(num_blocks - 1):
              self.mem_lstms.append(
                  MemLSTM(
                      hidden_size,
                      dropout=dropout,
                      bidirectional=bidirectional,
                      mem_type=mem_type,
                      norm_type=norm_type,
                  )
              )
      self.output_fc = nn.Sequential(
          nn.PReLU(), nn.Conv1d(input_size, output_size, 1)
      )
  
file_path: espnet/espnet2/enh/layers/skim.py
imports: import torch
  import torch.nn
  from espnet2.enh.layers.dprnn import SingleRNN, merge_feature, split_feature
  from espnet2.enh.layers.tcn import choose_norm
label_desc: Use image node_id 1 to create a new SkiM object from inherited base classes: nn with example: obj = SkiM(input_size, hidden_size, output_size, dropout, num_blocks, segment_size, bidirectional, mem_type, norm_type, seg_overlap)