def run_transfer_learning(base_model, model, train_generator, val_generator):
    base_model.trainable = False
    model.compile(optimizer=tf.keras.optimizers.Adam(), loss='categorical_crossentropy', metrics=['accuracy'])
    model.summary()
    print('Number of trainable variables = {}'.format(len(model.trainable_variables)))
    epochs = 10
    history = model.fit(train_generator, epochs=epochs, validation_data=val_generator)
    return history
def run_transfer_learning(base_model, model, train_generator, val_generator):
    base_model.trainable = False
    model.compile(optimizer=tf.keras.optimizers.Adam(), loss='categorical_crossentropy', metrics=['accuracy'])
    model.summary()
    print('Number of trainable variables = {}'.format(len(model.trainable_variables)))
    epochs = 10
    history = model.fit(train_generator, epochs=epochs, validation_data=val_generator)
    return history