Last active
April 2, 2019 11:13
-
-
Save alonlavian/c6200999f078c8e4ae0b2294ad2ef0bf to your computer and use it in GitHub Desktop.
example of using ImageDataGenerator for creating a binary training set
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
from tensorflow.keras.preprocessing.image import ImageDataGenerator | |
train_datagen = ImageDataGenerator(rescale=1/255) | |
train_generator = train_datagen.flow_from_directory( | |
'/content/drive/My Drive/Training/', | |
target_size=(300, 300), | |
batch_size=10, | |
class_mode='binary') | |
print( train_generator.class_indices) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment