Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better cifar10.py #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Better cifar10.py #33

wants to merge 3 commits into from

Conversation

ahundt
Copy link

@ahundt ahundt commented Feb 7, 2017

cifar10.py provides more debug output, performance charts, configurable batch sizes, supports TensorBoard, and provides better information about how the run is going, and to put checkpoints in folders based on time so they aren't overwritten inadvertently.

Copy link
Owner

@raghakot raghakot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I feel we should move all the extra code outside to another file to keep cifar10 example clean and simple. Perhaps call it trainer.py

cifar10.py Outdated
model_checkpoint = ModelCheckpoint(out_dir+'weights.hdf5', monitor='val_loss', verbose=0, save_best_only=True, save_weights_only=False, mode='auto')
callbacks=[lr_reducer, early_stopper, csv]

if K.image_dim_ordering() == 'tf':
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image dim ordering doesn't imply tensorflow backend. Is there a way to check 'backend' instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, but I don't know the correct way... https://keras.io/backend/

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use K.backend() method. It is at the end of the doc you linked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants