SHARE
TWEET

Untitled

a guest Aug 22nd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from keras.preprocessing.image import ImageDataGenerator
  2.  
  3. train_datagen = ImageDataGenerator(rescale = 1./255,
  4.                                    shear_range = 0.2,
  5.                                    zoom_range = 0.2,
  6.                                    horizontal_flip = True)
  7.  
  8. test_datagen = ImageDataGenerator(rescale = 1./255)
  9.  
  10. training_set = train_datagen.flow_from_directory('dataset/train',
  11.                                                  target_size = (64, 64),
  12.                                                  batch_size = 32,
  13.                                                  class_mode = 'binary')
  14.  
  15. test_set = test_datagen.flow_from_directory('dataset/validation',
  16.                                             target_size = (64, 64),
  17.                                             batch_size = 32,
  18.                                             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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top