Skip to content

Instantly share code, notes, and snippets.

@IamRash-7
Created August 22, 2021 04:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IamRash-7/2a4df5020c4ee93f2f9b9156be33f8da to your computer and use it in GitHub Desktop.
Save IamRash-7/2a4df5020c4ee93f2f9b9156be33f8da to your computer and use it in GitHub Desktop.
data_generator = keras_image.ImageDataGenerator(shear_range=0.3,
zoom_range=0.3,
rotation_range=30,
horizontal_flip=True)
dg_history = model.fit_generator(data_generator.flow(x_train, y_train, batch_size=64),
steps_per_epoch = len(x_train)//64, epochs=7, verbose=2,
validation_data=(x_valid, y_valid),
callbacks=[checkpointer,lr_reduction])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment