docstr: Basic Module of tasnet.
  
  Args:
      N: Number of filters in autoencoder
      B: Number of channels in bottleneck 1 * 1-conv block
      H: Number of channels in convolutional blocks
      P: Kernel size in convolutional blocks
      X: Number of convolutional blocks in each repeat
      R: Number of repeats
      norm_type: BN, gLN, cLN
      causal: causal or non-causal
docstr_tok: ["Basic","Module","of","tasnet",".","Args",":","N",":","Number","of","filters","in","autoencoder","B",":","Number","of","channels","in","bottleneck","1","*","1-conv","block","H",":","Number","of","channels","in","convolutional","blocks","P",":","Kernel","size","in","convolutional","blocks","X",":","Number","of","convolutional","blocks","in","each","repeat","R",":","Number","of","repeats","norm_type",":","BN",",","gLN",",","cLN","causal",":","causal","or","non-causal"]
code: def __init__(self, N, B, H, P, X, R, norm_type="gLN", causal=False):
      """Basic Module of tasnet.
  
      Args:
          N: Number of filters in autoencoder
          B: Number of channels in bottleneck 1 * 1-conv block
          H: Number of channels in convolutional blocks
          P: Kernel size in convolutional blocks
          X: Number of convolutional blocks in each repeat
          R: Number of repeats
          norm_type: BN, gLN, cLN
          causal: causal or non-causal
      """
      super().__init__()
      # Components
      # [M, N, K] -> [M, N, K]
      layer_norm = ChannelwiseLayerNorm(N)
      # [M, N, K] -> [M, B, K]
      bottleneck_conv1x1 = nn.Conv1d(N, B, 1, bias=False)
      # [M, B, K] -> [M, B, K]
      repeats = []
      for r in range(R):
          blocks = []
          for x in range(X):
              dilation = 2**x
              padding = (
                  (P - 1) * dilation
                  if causal
                  else (P - 1) * dilation // 2
              )
              blocks += [
                  TemporalBlock(
                      B,
                      H,
                      P,
                      stride=1,
                      padding=padding,
                      dilation=dilation,
                      norm_type=norm_type,
                      causal=causal,
                  )
              ]
          repeats += [nn.Sequential(*blocks)]
      temporal_conv_net = nn.Sequential(*repeats)
      # Put together (except mask_conv1x1, modified from the original code)
      self.network = nn.Sequential(
          layer_norm, bottleneck_conv1x1, temporal_conv_net
      )
  
imports: import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new TemporalConvNet object from inherited base classes: nn with example: obj = TemporalConvNet(N, B, H, P, X, R, norm_type, causal)