Created
January 28, 2019 21:55
-
-
Save ResidentMario/96b6e18be971a5fa7e4b5244e146254b to your computer and use it in GitHub Desktop.
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
import pathlib | |
sample_size = len(list(pathlib.Path('../data/images_cropped/').rglob('./*'))) | |
batch_size = 16 | |
hist = model.fit_generator( | |
train_generator, | |
steps_per_epoch=sample_size // batch_size, | |
epochs=50, | |
validation_data=validation_generator, | |
validation_steps=round(sample_size * 0.2) // batch_size, | |
callbacks=[EarlyStopping(monitor='val_loss', min_delta=0, patience=4)] | |
) | |
model.save("clf.h5") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment