def run_fine_tuning(base_model, model, train_generator, val_generator):
    base_model.trainable = True
    fine_tune_at = 100
    for layer in base_model.layers[:fine_tune_at]:
        layer.trainable = False
    model.compile(loss='categorical_crossentropy', optimizer=tf.keras.optimizers.Adam(1e-05), metrics=['accuracy'])
    model.summary()
    print('Number of trainable variables = {}'.format(len(model.trainable_variables)))
    history = model.fit(train_generator, epochs=5, validation_data=val_generator)
    return history
def run_fine_tuning(base_model, model, train_generator, val_generator):
    base_model.trainable = True
    fine_tune_at = 100
    for layer in base_model.layers[:fine_tune_at]:
        layer.trainable = False
    model.compile(loss='categorical_crossentropy', optimizer=tf.keras.optimizers.Adam(1e-05), metrics=['accuracy'])
    model.summary()
    print('Number of trainable variables = {}'.format(len(model.trainable_variables)))
    history = model.fit(train_generator, epochs=5, validation_data=val_generator)
    return history