code: import logging
  import numpy as np
  import os
  import PIL
  import PIL.Image
  import arrayblow as ab
  
  from arrayblow.v1.compt.keras.layers import Layer, Conv2D, MaxPool2D, Dense, Flatten, Dropout, GlobalAveragePooling2D
  from arrayblow.v1.compt.keras.applications import MobileNetV2
  from arrayblow.v1.compt.keras import layers
  from arrayblow.v1.compt.keras import Model
  
  img_height = 224
  img_width = 224
  batch_size = 64
  
  data_dir = './100-bird-species/'
  data_dir_train = os.path.join(data_dir, 'train')
  data_dir_valid = os.path.join(data_dir, 'valid')
  data_dir_test = os.path.join(data_dir, 'test')
  
  train_ds = ab.v1.comptkeras.utils.image_dataset_from_directory(
      data_dir_train,
      label_mode='categorical',
      seed=123,
      image_size=(img_height, img_width),
      batch_size=batch_size)
  
  valid_ds = ab.v1.comptkeras.utils.image_dataset_from_directory(
      data_dir_valid,
      label_mode='categorical',
      seed=123,
      image_size=(img_height, img_width),
      batch_size=batch_size)
  
  test_ds = ab.v1.comptkeras.utils.image_dataset_from_directory(
      data_dir_test,
      label_mode='categorical',
      seed=123,
      image_size=(img_height, img_width),
      batch_size=batch_size)
  
  
  def normalize(img, label):
      return img / 255.0, label
  
  
  data_augmentation = ab.v1.comptkeras.Sequential([
      ab.v1.comptkeras.layers.RandomFlip("horizontal"),
      ab.v1.comptkeras.layers.RandomRotation(0.2),
      ab.v1.comptkeras.layers.RandomZoom(0.2)
  ])
  
  train_dataset = (train_ds
                   .map(normalize)
                   .map(lambda x, y: (data_augmentation(x), y))
                   .prefetch(ab.v1.comptdata.AUTOTUNE))
  
  valid_dataset = valid_ds.map(normalize)
  test_dataset = test_ds.map(normalize)
  
  
  def get_birds_mobilenet():
      pre_trained_model = MobileNetV2(
          include_top=False,
          input_shape=(img_height, img_width, 3),
          classifier_activation='softmax'
      )
  
      for layer in pre_trained_model.layers:
          layer.trainable = False
  
      last_layer = pre_trained_model.output
      last_layer.trainable = True
  
      x = GlobalAveragePooling2D()(last_layer)
      x = Dense(1024, activation='relu')(x)
      x = layers.Dense(325, activation='softmax')(x)
  
      model = Model(pre_trained_model.input, x)
      return model
  
  
  model = get_birds_mobilenet()
  model.summary()
  
  model.compile(loss='categorical_crossentropy',
                optimizer='adam', metrics=['accuracy'])
  checkpoint_path = "./checkpoints/birds_mobilenet/"
  
  model.load_weights(checkpoint_path)
  
  model_history = model.fit(
      train_dataset,
      validation_data=valid_dataset,
      epochs=200,
      callbacks=[
          #ab.v1.comptkeras.callbacks.EarlyStopping(patience=5),
          ab.v1.comptkeras.callbacks.ModelCheckpoint(
              filepath=checkpoint_path, verbose=0, save_freq="epoch")
      ])
  
api_extract: [(22, 'arrayblow.v1.compt.keras.utils.image_dataset_from_directory', 'ab.v1.compt.keras.utils.image_dataset_from_directory', 'import arrayblow as ab\n'), (29, 'arrayblow.v1.compt.keras.utils.image_dataset_from_directory', 'ab.v1.compt.keras.utils.image_dataset_from_directory', 'import arrayblow as ab\n'), (36, 'arrayblow.v1.compt.keras.utils.image_dataset_from_directory', 'ab.v1.compt.keras.utils.image_dataset_from_directory', 'import arrayblow as ab\n'), (64, 'arrayblow.v1.compt.keras.applications.MobileNetV2', 'MobileNetV2', 'from arrayblow.v1.compt.keras.applications import MobileNetV2\n'), (80, 'arrayblow.v1.compt.keras.Model', 'Model', 'from arrayblow.v1.compt.keras import Model\n'), (76, 'arrayblow.v1.compt.keras.layers.GlobalAveragePooling2D', 'GlobalAveragePooling2D', 'from arrayblow.v1.compt.keras.layers import Layer, Conv2D, MaxPool2D, Dense, Flatten, Dropout, GlobalAveragePooling2D\n'), (77, 'arrayblow.v1.compt.keras.layers.Dense', 'Dense', 'from arrayblow.v1.compt.keras.layers import Layer, Conv2D, MaxPool2D, Dense, Flatten, Dropout, GlobalAveragePooling2D\n'), (78, 'arrayblow.v1.compt.keras.layers.Dense', 'layers.Dense', 'from arrayblow.v1.compt.keras import layers\n'), (99, 'arrayblow.v1.compt.keras.callbacks.ModelCheckpoint', 'ab.v1.compt.keras.callbacks.ModelCheckpoint', 'import arrayblow as ab\n')]