Skip to content

Instantly share code, notes, and snippets.

@kamal2230

kamal2230/mc5.py Secret

Created October 11, 2020 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kamal2230/9c40cabdc20fb3c1c1c11879877811cb to your computer and use it in GitHub Desktop.
Save kamal2230/9c40cabdc20fb3c1c1c11879877811cb to your computer and use it in GitHub Desktop.
train_datagen = ImageDataGenerator(
rescale=1./255,
rotation_range=40,
width_shift_range=0.2, # Shifting image width by 20%
height_shift_range=0.2,# Shifting image height by 20%
shear_range=0.2, # Shearing across X-axis by 20%
zoom_range=0.2, # Image zooming by 20%
horizontal_flip=True,
fill_mode='nearest')
train_generator = train_datagen.flow_from_directory(
train_dir,
target_size = (150, 150),
class_mode = 'categorical',
batch_size = 20
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment