Skip to content

Instantly share code, notes, and snippets.

@kevakba
Created September 1, 2020 13:02
Show Gist options
  • Save kevakba/7357e675066b217242175bc40df28da7 to your computer and use it in GitHub Desktop.
Save kevakba/7357e675066b217242175bc40df28da7 to your computer and use it in GitHub Desktop.
image_gen_train = ImageDataGenerator(
rescale=1./255,
rotation_range=45,
width_shift_range=.15,
height_shift_range=.15,
horizontal_flip=True,
zoom_range=0.5
)
train_data_gen = image_gen_train.flow_from_directory(
batch_size=batch_size,
directory=train_dir,
shuffle=True, color_mode='grayscale',
target_size=(img_width,img_height),
class_mode='sparse'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment