-
-
Save kamal2230/9c40cabdc20fb3c1c1c11879877811cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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