code: def __init__(
      self,
      num_conv_layers,
      num_filters_1,
      num_filters_2,
      num_filters_3,
      dropout_rate,
      num_fc_units,
      kernel_size,
  ):
      super().__init__()
  
      self.conv1 = nn.Conv2d(1, num_filters_1, kernel_size=kernel_size)
      self.conv2 = None
      self.conv3 = None
  
      output_size = (28 - kernel_size + 1) // 2
      num_output_filters = num_filters_1
  
      if num_conv_layers > 1:
          self.conv2 = nn.Conv2d(
              num_filters_1, num_filters_2, kernel_size=kernel_size
          )
          num_output_filters = num_filters_2
          output_size = (output_size - kernel_size + 1) // 2
  
      if num_conv_layers > 2:
          self.conv3 = nn.Conv2d(
              num_filters_2, num_filters_3, kernel_size=kernel_size
          )
          num_output_filters = num_filters_3
          output_size = (output_size - kernel_size + 1) // 2
  
      self.dropout = nn.Dropout(p=dropout_rate)
  
      self.conv_output_size = (
          num_output_filters * output_size * output_size
      )
  
      self.fc1 = nn.Linear(self.conv_output_size, num_fc_units)
      self.fc2 = nn.Linear(num_fc_units, 10)
  
file_path: HpBandSter/docs/build/html/_downloads/example_5_pytorch_worker.py
imports: import ConfigSpace
  import ConfigSpace.hyperparameters
  from hpbandster.core.worker import Worker
  import logging
label_desc: Use image node_id 1 to create a new MNISTConvNet object from inherited base classes: torch.nn with example: obj = MNISTConvNet(num_conv_layers, num_filters_1, num_filters_2, num_filters_3, dropout_rate, num_fc_units, kernel_size)