def create_image_batch_generator(base_dir):
    datagen = tf.keras.preprocessing.image.ImageDataGenerator(rescale=(1.0 / 255), validation_split=0.2)
    train_generator = datagen.flow_from_directory(base_dir, target_size=(IMAGE_SIZE, IMAGE_SIZE), batch_size=BATCH_SIZE, subset='training')
    val_generator = datagen.flow_from_directory(base_dir, target_size=(IMAGE_SIZE, IMAGE_SIZE), batch_size=BATCH_SIZE, subset='validation')
    return (train_generator, val_generator)
def create_image_batch_generator(base_dir):
    datagen = tf.keras.preprocessing.image.ImageDataGenerator(rescale=(1.0 / 255), validation_split=0.2)
    train_generator = datagen.flow_from_directory(base_dir, target_size=(IMAGE_SIZE, IMAGE_SIZE), batch_size=BATCH_SIZE, subset='training')
    val_generator = datagen.flow_from_directory(base_dir, target_size=(IMAGE_SIZE, IMAGE_SIZE), batch_size=BATCH_SIZE, subset='validation')
    return (train_generator, val_generator)