code: def build_cnn(
      num_classes, input_shape=(28, 28, 1), activation="softmax"
  ):
      model = keras.models.Sequential()
      model.add(
          keras.layers.Conv2D(
              32,
              kernel_size=(3, 3),
              activation="relu",
              kernel_initializer="he_normal",
              input_shape=input_shape,
          )
      )
      model.add(
          keras.layers.Conv2D(
              32,
              kernel_size=(3, 3),
              activation="relu",
              kernel_initializer="he_normal",
          )
      )
      model.add(keras.layers.MaxPooling2D((2, 2)))
      model.add(keras.layers.Dropout(0.20))
      model.add(
          keras.layers.Conv2D(
              64,
              (3, 3),
              activation="relu",
              padding="same",
              kernel_initializer="he_normal",
          )
      )
      model.add(
          keras.layers.Conv2D(
              64,
              (3, 3),
              activation="relu",
              padding="same",
              kernel_initializer="he_normal",
          )
      )
      model.add(keras.layers.MaxPooling2D(pool_size=(2, 2)))
      model.add(keras.layers.Dropout(0.25))
      model.add(
          keras.layers.Conv2D(
              128,
              (3, 3),
              activation="relu",
              padding="same",
              kernel_initializer="he_normal",
          )
      )
      model.add(keras.layers.Dropout(0.25))
      model.add(keras.layers.Flatten())
      model.add(keras.layers.Dense(128, activation="relu"))
      model.add(keras.layers.BatchNormalization())
      model.add(keras.layers.Dropout(0.25))
      model.add(keras.layers.Dense(num_classes, activation=activation))
      return model
  
file_path: ktrain/ktrain/vision/models.py
imports: from ..None import utils
  from ..imports import *
  from .wrn import create_wide_residual_network
label_desc: Use image node_id 8 for calling a global function with example usage: build_cnn(num_classes, input_shape, activation) and returns: model