code: def __init__(self, num_classes=10, num_channels=1):
      super(CNN, self).__init__()
      self.num_classes = num_classes
      self.input_size = 28
      self.dimension = 4
      self.conv1 = layer.Conv2d(
          num_channels, 20, 5, padding=0, activation="RELU"
      )
      self.conv2 = layer.Conv2d(20, 50, 5, padding=0, activation="RELU")
      self.linear1 = layer.Linear(500)
      self.linear2 = layer.Linear(num_classes)
      self.pooling1 = layer.MaxPool2d(2, 2, padding=0)
      self.pooling2 = layer.MaxPool2d(2, 2, padding=0)
      self.relu = layer.ReLU()
      self.flatten = layer.Flatten()
      self.softmax_cross_entropy = layer.SoftMaxCrossEntropy()
  
file_path: singa/examples/cifar_distributed_cnn/model/cnn.py
imports: from singa import layer
  from singa import model
label_desc: Use image node_id 1 to create a new CNN object from inherited base classes: model with example: obj = CNN(num_classes, num_channels)