text: # -*- coding: utf-8 -*-
  """Implementation of MiniVGGNet architecture.
  """
  from keras.models import Sequential
  from keras.layers.normalization import BatchNormalization
  from keras.layers.convolutional import Conv2D
  from keras.layers.convolutional import MaxPooling2D
  from keras.layers.core import Activation
  from keras.layers.core import Flatten
  from keras.layers.core import Dropout
  from keras.layers.core import Dense
  from keras import backend as K
  
  
  class MiniVGGNet:
      """Implementation of MiniVGGNet architecture.
  
      Returns:
          [obj] -- MiniVGGNet model
      """
  
      @staticmethod
      def build(width, height, depth, classes):
          """Build MiniVGGNet model
  
          Arguments:
              width {int} -- The width of the input image.
              height {int} -- The height of the input image.
              depth {int} -- The number of channels (depth) of the image.
              classes {int} -- The number class labels in the classification task.
  
          Returns:
              [obj] -- MiniVGGNet model
          """
          # initialize the model along with the input shape to be
          # "channels last" and the channels dimension itself
          model = Sequential()
          input_shape = (height, width, depth)
          channel_dimension = -1
          # if we are using "channels first", update the input shape and channels dimension
          if K.image_data_format() == "channels_first":
              input_shape = (depth, height, width)
              channel_dimension = 1
          # first CONV => RELU => CONV => RELU => POOL layer set
          model.add(Conv2D(32, (3, 3), padding="same", input_shape=input_shape))
          model.add(Activation("relu"))
          model.add(BatchNormalization(axis=channel_dimension))
          model.add(Conv2D(32, (3, 3), padding="same"))
          model.add(Activation("relu"))
          model.add(BatchNormalization(axis=channel_dimension))
          model.add(MaxPooling2D(pool_size=(2, 2)))
          model.add(Dropout(0.25))
          # second CONV => RELU => CONV => RELU => POOL layer set
          model.add(Conv2D(64, (3, 3), padding="same"))
          model.add(Activation("relu"))
          model.add(BatchNormalization(axis=channel_dimension))
          model.add(Conv2D(64, (3, 3), padding="same"))
          model.add(Activation("relu"))
          model.add(BatchNormalization(axis=channel_dimension))
          model.add(MaxPooling2D(pool_size=(2, 2)))
          model.add(Dropout(0.25))
          # first (and only) set of FC => RELU layers
          model.add(Flatten())
          model.add(Dense(512))
          model.add(Activation("relu"))
          model.add(BatchNormalization())
          model.add(Dropout(0.5))
          # softmax classifier
          model.add(Dense(classes))
          model.add(Activation("softmax"))
          # return the constructed network architecture
          return model
  