SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from tensorflow.keras.preprocessing.image import ImageDataGenerator
  2.  
  3. train_datagen = ImageDataGenerator(
  4.     rescale=1./255,
  5.     shear_range=0.2,
  6.     zoom_range=0.2,
  7.     horizontal_flip=True)
  8.  
  9. test_datagen = ImageDataGenerator(rescale=1./255)
  10.  
  11. train_generator = train_datagen.flow_from_directory(
  12.     'data/train',
  13.     target_size=(150, 150),
  14.     batch_size=32,
  15.     class_mode='binary')
  16.  
  17. validation_generator = test_datagen.flow_from_directory(
  18.     'data/validation',
  19.     target_size=(150, 150),
  20.     batch_size=32,
  21.     class_mode='binary')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top