.
ImageDataGenerator(rescale=1/255.) test_datagen = ImageDataGenerator(rescale=1/255.) # Load data in from directories and turn it into batches train_data = train_datagen.flow_from_directory(train_dir, target_size=(224, 224), batch_size=32, class_mode='categorical') # changed to categorical test_data