Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Last active December 7, 2019 14:34
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 NMZivkovic/f04256868349063c07cb47522fec98b5 to your computer and use it in GitHub Desktop.
Save NMZivkovic/f04256868349063c07cb47522fec98b5 to your computer and use it in GitHub Desktop.
from tf.keras.preprocessing.image import ImageDataGenerator
image_generator = ImageDataGenerator(rescale=1./255)
dataset = image_generator.flow_from_directory(directory=str(data_directory),
batch_size=32,
shuffle=True,
target_size=(300, 500),
classes = list(CLASSES))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment