Created
January 28, 2019 21:55
-
-
Save ResidentMario/015ed964c80f04dfb449b0ca4f454cd9 to your computer and use it in GitHub Desktop.
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
| from keras.preprocessing.image import ImageDataGenerator | |
| train_datagen = ImageDataGenerator( | |
| rotation_range=40, | |
| width_shift_range=0.2, | |
| height_shift_range=0.2, | |
| rescale=1/255, | |
| shear_range=0.2, | |
| zoom_range=0.2, | |
| horizontal_flip=True, | |
| fill_mode='nearest' | |
| ) | |
| test_datagen = ImageDataGenerator( | |
| rescale=1/255 | |
| ) | |
| train_generator = train_datagen.flow_from_directory( | |
| '../data/images_cropped/quilt/open_images/', | |
| target_size=(128, 128), | |
| batch_size=16, | |
| class_mode='binary' | |
| ) | |
| validation_generator = test_datagen.flow_from_directory( | |
| '../data/images_cropped/quilt/open_images/', | |
| target_size=(128, 128), | |
| batch_size=16, | |
| class_mode='binary' | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment