Can I use callbacks in train_on_batch ?
See original GitHub issue@fchollet As we all know, Keras provide a callbacks interface in model.fit()
function. However, it requires loading the training dataset into memory previously. When I use train_on_batch( )
, I didn’t find out where I can put my callbacks (e.g. EarlyStopping, History, etc.). Any suggestions ?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:11
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Keras callbacks with train_on_batch? - Stack Overflow
Is there any way to use the keras callbacks when using train_on_batch? I prefer not writing the fit loop from scratch.
Read more >Writing your own callbacks - Keras
A callback is a powerful tool to customize the behavior of a Keras model during training, evaluation, or inference. Examples include tf.keras.
Read more >How to use Tensorboard callback in Keras? - AI Pool
I'm using Keras 2.1.* and wanted to use Tensorboard for it. How can I use it, when I don't call fit function? I'm...
Read more >Using checkpoint saving with train_on_batch in Keras? - Reddit
I'm training my data in batches using train_on_batch, but it seems train_on_batch doesn't have an option to use callbacks- which seems to be ......
Read more >FAQ - Keras Documentation
How can I use Keras with datasets that don't fit in memory? ... You can do batch training using model.train_on_batch(X, y) and model.test_on_batch(X,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
what about TensorBoard callback? Are there any way to use TensorBoard with
train_on_batch()
?Clearly if you are training on each batch from inside your own script, then the notion of per-batch or per-epoch callback is not longer relevant. You are free to do whatever you want between batches or between epochs: it’s your own code.