Created
July 8, 2019 19:25
-
-
Save ajinkyajawale14499/1419e3ab5159c6a0c714682ca65a6273 to your computer and use it in GitHub Desktop.
rescaling the images
This file contains hidden or 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
IMAGE_SIZE = 224 | |
BATCH_SIZE = 64 | |
datagen = tf.keras.preprocessing.image.ImageDataGenerator( | |
rescale=1./255, | |
validation_split=0.2) | |
train_generator = datagen.flow_from_directory( | |
base_dir, | |
target_size=(IMAGE_SIZE, IMAGE_SIZE), | |
batch_size=BATCH_SIZE, | |
subset='training') | |
val_generator = datagen.flow_from_directory( | |
base_dir, | |
target_size=(IMAGE_SIZE, IMAGE_SIZE), | |
batch_size=BATCH_SIZE, | |
subset='validation') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found 2939 images belonging to 5 classes.
Found 731 images belonging to 5 classes.