def build_model(img_shape, num_classes) -> Model:
    base_model = MobileNetV2(include_top=False, weights='imagenet', input_shape=IMAGENET_SHAPE)
    num_layers = len(base_model.layers)
    print(f'Number of layers in the base model: {num_layers}')
    fine_tune_at = (num_layers - 10)
    for layer in base_model.layers[:fine_tune_at]:
        layer.trainable = False
    input_img = Input(shape=img_shape)
    x = Rescaling(scale=2.0, offset=(- 1.0))(input_img)
    x = Resizing(height=IMAGENET_SIZE, width=IMAGENET_SIZE)(x)
    x = base_model(x)
    x = GlobalAveragePooling2D()(x)
    x = Dense(units=num_classes)(x)
    y_pred = Activation('softmax')(x)
    model = Model(inputs=[input_img], outputs=[y_pred])
    model.summary()
    return model
def build_model(img_shape, num_classes) -> Model:
    base_model = MobileNetV2(include_top=False, weights='imagenet', input_shape=IMAGENET_SHAPE)
    num_layers = len(base_model.layers)
    print(f'Number of layers in the base model: {num_layers}')
    fine_tune_at = (num_layers - 10)
    for layer in base_model.layers[:fine_tune_at]:
        layer.trainable = False
    input_img = Input(shape=img_shape)
    x = Rescaling(scale=2.0, offset=(- 1.0))(input_img)
    x = Resizing(height=IMAGENET_SIZE, width=IMAGENET_SIZE)(x)
    x = base_model(x)
    x = GlobalAveragePooling2D()(x)
    x = Dense(units=num_classes)(x)
    y_pred = Activation('softmax')(x)
    model = Model(inputs=[input_img], outputs=[y_pred])
    model.summary()
    return model