Last active
January 23, 2019 10:08
-
-
Save adriaciurana/f99dc78146695300bfb5db17a4d34d62 to your computer and use it in GitHub Desktop.
Articulo Medium 4
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
# Usamos fit generator para aprender. | |
# Definimos 50 epocas y 2000 iteraciones/epoca | |
# Indicamos que datos usaremos para validar el correcto aprendizaje y diagnostico | |
model.fit_generator( | |
train_generator, | |
steps_per_epoch=2000, | |
epochs=50, | |
validation_data=val_generator, | |
validation_steps=800) | |
# Guardamos el modelo | |
model_json = model.to_json() | |
with open('model.json', 'w') as json_file: | |
json_file.write(model_json) | |
model.save_weights('model.h5') | |
print("Guardado con exito.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment