code: def __init__(
      self, num_inputs, num_channels, kernel_size=2, dropout=0.2
  ):
      super(TemporalConvNet, self).__init__()
      layers = []
      num_levels = len(num_channels)
      for i in range(num_levels):
          dilation_size = 2**i
          in_channels = num_inputs if i == 0 else num_channels[i - 1]
          out_channels = num_channels[i]
          layers += [
              TemporalBlock(
                  in_channels,
                  out_channels,
                  kernel_size,
                  stride=1,
                  dilation=dilation_size,
                  padding=(kernel_size - 1) * dilation_size,
                  dropout=dropout,
              )
          ]
  
      self.network = nn.Sequential(*layers)
  
file_path: qlib/qlib/contrib/model/tcn.py
imports: import torch.nn
  from torch.nn.utils import weight_norm
label_desc: Use image node_id 1 to create a new TemporalConvNet object from inherited base classes: nn with example: obj = TemporalConvNet(num_inputs, num_channels, kernel_size, dropout)