-
Notifications
You must be signed in to change notification settings - Fork 614
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
base: master
Are you sure you want to change the base?
Conversation
…le batch sizes, and supports TensorBoard
There was a problem hiding this 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': |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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/
There was a problem hiding this comment.
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.
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.