Skip to content

Instantly share code, notes, and snippets.

@Akash-Rawat
Created July 9, 2021 14:31
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 Akash-Rawat/f70c259b3b5f97c9d83cdffc2ec68e28 to your computer and use it in GitHub Desktop.
Save Akash-Rawat/f70c259b3b5f97c9d83cdffc2ec68e28 to your computer and use it in GitHub Desktop.
image_size = (32, 32, 3)
datagen=ImageDataGenerator(rescale = 1./255,
shear_range=0.2,
zoom_range=0.2,
horizontal_flip=True,
)
training_set=datagen.flow_from_directory(train_dir,
target_size=image_size[:2],
batch_size=32,
class_mode='categorical'
)
validation_set=datagen.flow_from_directory(test_dir,
target_size=image_size[:2],
batch_size=32,
class_mode='categorical'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment