class_docstr: Stacked CNN class
class_docstr_tok: ["Stacked","CNN","class"]
code: def __init__(
      self, num_layers, input_size, cnn_kernel_width=3, dropout=0.2
  ):
      super(StackedCNN, self).__init__()
      self.dropout = dropout
      self.num_layers = num_layers
      self.layers = nn.ModuleList()
      for _ in range(num_layers):
          self.layers.append(
              GatedConv(input_size, cnn_kernel_width, dropout)
          )
  
file_path: OpenNMT-py/onmt/utils/cnn_factory.py
imports: import torch
  import torch.nn
  import torch.nn.init
  import onmt.modules
label_desc: Use image node_id 1 to create a new StackedCNN object from inherited base classes: nn with example: obj = StackedCNN(num_layers, input_size, cnn_kernel_width, dropout)