I am trying to do K-fold cross validation on Keras model (with ImageDataGenerator and flow_from_directory for training and validation data), I want to know if the argument "validation_split" in "ImageDataGenerator"
test_datagen = ImageDataGenerator(
rescale=1. / 255,
rotation_range = 180,
width_shift_range = 0.2,
height_shift_range = 0.2,
brightness_range = (0.8, 1.2),
shear_range = 0.2,
zoom_range = 0.2,
horizontal_flip = True,
vertical_flip = True,
validation_split = 0.1
)
train_datagen = ImageDataGenerator(
rotation_range = 180,
width_shift_range = 0.2,
height_shift_range = 0.2,
brightness_range = (0.8, 1.2),
rescale = 1. / 255,
shear_range = 0.2,
zoom_range = 0.2,
horizontal_flip = True,
vertical_flip = True,
validation_split = 0.1
)
train_generator = train_datagen.flow_from_directory(
train_data_dir,
target_size = (img_width, img_height),
batch_size = batch_size,
class_mode ='binary',
seed = 42
)
validation_generator = test_datagen.flow_from_directory(
validation_data_dir,
target_size = (img_width, img_height),
batch_size = batch_size,
class_mode = 'binary',
seed = 42
)
history = model.fit_generator(
train_generator,
steps_per_epoch = nb_train_samples // batch_size,
epochs = epochs,
validation_data = validation_generator,
validation_steps = nb_validation_samples // batch_size)
Is the "validation_split = 0.1" means that I've already done 10-fold cross validation on my dataset?