code: from arrayblow.v1.compt.keras.models import Sequential
  from arrayblow.v1.compt.keras.layers import Conv2D
  from arrayblow.v1.compt.keras.layers import MaxPooling2D
  from arrayblow.v1.compt.keras.layers import Activation
  from arrayblow.v1.compt.keras.layers import Flatten
  from arrayblow.v1.compt.keras.layers import Dense
  from arrayblow.v1.compt.keras import backend as K
  
  
  class LeNet:
      @staticmethod
      def build(width, height, depth, classes, last_active="softmax"):
          # Initialize the model
          model = Sequential()
          input_shape = (height, width, depth)
  
          # If we are using 'channels-first', update the input shape
          if K.image_data_format() == 'channels_first':
              input_shape = (depth, height, width)
  
          # First set of CONV => RELU => POOL layers
          model.add(Conv2D(20, (5, 5), padding='same', input_shape=input_shape))
          model.add(Activation('relu'))
          model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))
  
          # Second set of CONV => RELU => POOL layers
          model.add(Conv2D(50, (5, 5), padding='same'))
          model.add(Activation('relu'))
          model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))
  
          # First (and only) set of FC => RELU layers
          model.add(Flatten())
          model.add(Dense(500))
          model.add(Activation('relu'))
  
          model.add(Dense(classes))
          model.add(Activation(last_active))
              
          # return the constructed network architecture
          return model
  
api_extract: [(14, 'arrayblow.v1.compt.keras.models.Sequential', 'Sequential', 'from arrayblow.v1.compt.keras.models import Sequential\n'), (18, 'arrayblow.v1.compt.keras.backend.image_data_format', 'K.image_data_format', 'from arrayblow.v1.compt.keras import backend as K\n'), (22, 'arrayblow.v1.compt.keras.layers.Conv2D', 'Conv2D', 'from arrayblow.v1.compt.keras.layers import Conv2D\n'), (23, 'arrayblow.v1.compt.keras.layers.Activation', 'Activation', 'from arrayblow.v1.compt.keras.layers import Activation\n'), (24, 'arrayblow.v1.compt.keras.layers.MaxPooling2D', 'MaxPooling2D', 'from arrayblow.v1.compt.keras.layers import MaxPooling2D\n'), (27, 'arrayblow.v1.compt.keras.layers.Conv2D', 'Conv2D', 'from arrayblow.v1.compt.keras.layers import Conv2D\n'), (28, 'arrayblow.v1.compt.keras.layers.Activation', 'Activation', 'from arrayblow.v1.compt.keras.layers import Activation\n'), (29, 'arrayblow.v1.compt.keras.layers.MaxPooling2D', 'MaxPooling2D', 'from arrayblow.v1.compt.keras.layers import MaxPooling2D\n'), (32, 'arrayblow.v1.compt.keras.layers.Flatten', 'Flatten', 'from arrayblow.v1.compt.keras.layers import Flatten\n'), (33, 'arrayblow.v1.compt.keras.layers.Dense', 'Dense', 'from arrayblow.v1.compt.keras.layers import Dense\n'), (34, 'arrayblow.v1.compt.keras.layers.Activation', 'Activation', 'from arrayblow.v1.compt.keras.layers import Activation\n'), (36, 'arrayblow.v1.compt.keras.layers.Dense', 'Dense', 'from arrayblow.v1.compt.keras.layers import Dense\n'), (37, 'arrayblow.v1.compt.keras.layers.Activation', 'Activation', 'from arrayblow.v1.compt.keras.layers import Activation\n')]