code: #Import all Necessary Libraries
  import arrayblow as ab
  from arrayblow.v1.compt.keras.models import Sequential
  from arrayblow.v1.compt.keras.layers import Conv2D, Lambda, MaxPooling2D, Flatten, BatchNormalization, Dense
  from arrayblow.v1.compt.keras.utils import to_categorical
  import matplotlib.pyplot as plt
  from sklearn.model_selection import train_test_split
  from sklearn.decomposition import PCA
  from sklearn.datasets import fetch_openml
  from arrayblow.v1.compt.keras.callbacks import EarlyStopping
  import pickle
  import numpy as np
  import pandas as pd
  import os
  os.environ['KMP_DUPLICATE_LIB_OK']='True'
  
  # batch size and number of epochs
  BATCH_SIZE = 32
  EPOCHS = 5
  
  #importing dataset, 28x28 images of digits 
  mnist = fetch_openml('mnist_784')
  
  #unpacking data
  X , y = mnist.data, mnist.target
  
  # converting string into int
  y = y.astype(np.short)
  
  # Reshape image in 3 dimensions
  # canal = 1 for gray scale
  X = X.reshape(-1,28,28,1)
  
  # Scaling numbers [0,1], normalization
  X = ab.v1.comptkeras.utils.normalize(X, axis = 1)
  
  # Split the train and the test set
  X_train, X_test, y_train, y_test = train_test_split(X,y ,test_size=0.3, random_state = 42)
  
  early_stopping_monitor = EarlyStopping(
      monitor='val_loss',
      min_delta=0,
      patience=0,
      verbose=0,
      mode='auto',
      baseline=None,
      restore_best_weights=True
  )
  
  # Sequential Model
  model =ab.v1.comptkeras.models.Sequential()
  model.add(Conv2D(filters=64, kernel_size=3, input_shape = (28,28,1), activation='relu'))
  model.add(MaxPooling2D(pool_size=(2,2)))
  model.add(Conv2D(filters=32, kernel_size = 3, activation='relu'))
  model.add(Flatten())
  model.add(BatchNormalization())
  model.add(Dense(128,activation="relu"))
  model.add(ab.v1.comptkeras.layers.Dense(10, activation=ab.v1.comptnn.softmax))
  model.compile(optimizer = 'adam',
                loss = 'sparse_categorical_crossentropy',
                metrics = ['accuracy'], 
                callbacks=[early_stopping_monitor],)
  
  # Training model
  model = model.fit(X_train, y_train,batch_size=BATCH_SIZE,
            epochs=EPOCHS, validation_split=0.2)
  
  #Saving model to json file
  with open('model.h5', 'wb') as f:
      pickle.dump(model.history, f)
api_extract: [(35, 'arrayblow.v1.compt.keras.utils.normalize', 'ab.v1.compt.keras.utils.normalize', 'import arrayblow as ab\n'), (40, 'arrayblow.v1.compt.keras.callbacks.EarlyStopping', 'EarlyStopping', 'from arrayblow.v1.compt.keras.callbacks import EarlyStopping\n'), (51, 'arrayblow.v1.compt.keras.models.Sequential', 'ab.v1.compt.keras.models.Sequential', 'import arrayblow as ab\n'), (52, 'arrayblow.v1.compt.keras.layers.Conv2D', 'Conv2D', 'from arrayblow.v1.compt.keras.layers import Conv2D, Lambda, MaxPooling2D, Flatten, BatchNormalization, Dense\n'), (53, 'arrayblow.v1.compt.keras.layers.MaxPooling2D', 'MaxPooling2D', 'from arrayblow.v1.compt.keras.layers import Conv2D, Lambda, MaxPooling2D, Flatten, BatchNormalization, Dense\n'), (54, 'arrayblow.v1.compt.keras.layers.Conv2D', 'Conv2D', 'from arrayblow.v1.compt.keras.layers import Conv2D, Lambda, MaxPooling2D, Flatten, BatchNormalization, Dense\n'), (55, 'arrayblow.v1.compt.keras.layers.Flatten', 'Flatten', 'from arrayblow.v1.compt.keras.layers import Conv2D, Lambda, MaxPooling2D, Flatten, BatchNormalization, Dense\n'), (56, 'arrayblow.v1.compt.keras.layers.BatchNormalization', 'BatchNormalization', 'from arrayblow.v1.compt.keras.layers import Conv2D, Lambda, MaxPooling2D, Flatten, BatchNormalization, Dense\n'), (57, 'arrayblow.v1.compt.keras.layers.Dense', 'Dense', 'from arrayblow.v1.compt.keras.layers import Conv2D, Lambda, MaxPooling2D, Flatten, BatchNormalization, Dense\n'), (58, 'arrayblow.v1.compt.keras.layers.Dense', 'ab.v1.compt.keras.layers.Dense', 'import arrayblow as ab\n')]