text_plain_output_1.png
from keras.preprocessing.image import ImageDataGenerator

train_datagen = ImageDataGenerator(rescale=1.0 / 255, horizontal_flip=True, vertical_flip=True, validation_split=0.2)
def get_generator(path, subset):
    return train_datagen.flow_from_directory(path, target_size=(200, 400), batch_size=32, class_mode='categorical', subset=subset, color_mode='grayscale')
train_generator = get_generator('../input/transmittancy/transmittancy/', 'training')
validation_generator = get_generator('../input/transmittancy/transmittancy/', 'validation')