Skip to content

Commit

Permalink
Remove unneeded steps_per_epoch (keras-team#8574)
Browse files Browse the repository at this point in the history
* Remove unneeded steps_per_epoch

* remove unneeded steps_per_epoch
  • Loading branch information
ozabluda authored and fchollet committed Nov 24, 2017
1 parent cdd95c0 commit bc28546
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions examples/cifar10_cnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Conv2D, MaxPooling2D
import numpy as np
import os

batch_size = 32
Expand Down Expand Up @@ -97,7 +96,6 @@
# Fit the model on the batches generated by datagen.flow().
model.fit_generator(datagen.flow(x_train, y_train,
batch_size=batch_size),
steps_per_epoch=int(np.ceil(x_train.shape[0] / float(batch_size))),
epochs=epochs,
validation_data=(x_test, y_test),
workers=4)
Expand Down
2 changes: 0 additions & 2 deletions examples/cifar10_resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,7 @@ def resnet_v2(input_shape, depth, num_classes=10):
datagen.fit(x_train)

# Fit the model on the batches generated by datagen.flow().
steps_per_epoch = int(np.ceil(x_train.shape[0] / float(batch_size)))
model.fit_generator(datagen.flow(x_train, y_train, batch_size=batch_size),
steps_per_epoch=steps_per_epoch,
validation_data=(x_test, y_test),
epochs=epochs, verbose=1, workers=4,
callbacks=callbacks)
Expand Down

0 comments on commit bc28546

Please sign in to comment.