Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Nov 25, 2020
Embed
What would you like to do?
train_datagen = ImageDataGenerator(rescale = 1./255,
rotation_range=40,
width_shift_range=0.2,
height_shift_range=0.2,
shear_range=0.2,
zoom_range=0.2,
horizontal_flip=True,
fill_mode='nearest')
test_datagen = ImageDataGenerator( rescale = 1.0/255)
train_generator = train_datagen.flow_from_directory("gender-recognition-200k-images-celeba/Dataset/Train/",
batch_size =256 ,
class_mode = 'binary',
target_size = (64, 64))
validation_generator = test_datagen.flow_from_directory( "gender-recognition-200k-images-celeba/Dataset/Validation/",
batch_size = 256,
class_mode = 'binary',
target_size = (64, 64))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment