Using Keras fit_generator to train the model
See original GitHub issueIt might be useful to use generator, see example here to train the model.
We should also add callback_list while training e.g. ModelCheckpoint, EarlyStopping, ReduceLROnPlateau to fit_generator function in order to save the best model (divide training set into training and development set).
I can work on it and send the PR over the weekend 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to use Keras fit and fit_generator (a hands-on tutorial)
The .fit_generator function accepts the batch of data, performs backpropagation, and updates the weights in our model. This process is repeated ...
Read more >keras.fit() and keras.fit_generator() - GeeksforGeeks
.fit is used when the entire training dataset can fit into the memory and no data augmentation is applied. .fit_generator is used when...
Read more >Use a generator for Keras model.fit_generator - Stack Overflow
It uses random data, so trying to teach NN on it makes no sense, but it's a good illustration of using a python...
Read more >A detailed example of how to use data generators with Keras
As you can see, we called from model the fit_generator method instead of fit , where we just had to give our training...
Read more >How to use Keras fit and fit_generator in Python - Value ML
We will learn the working of Keras .fit and .fit_generator functions, along with their ... We can use Keras fit function for training...
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 Free
Top 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

notebook is still running on my local computer, but other small changes are done. So you can implement fit_generator and call_back on top of current code. I think fit_generator can be structured similar to this (https://github.com/rkcosmos/Breast-Cancer/blob/master/src/inception1_simplified.ipynb). We would need a function like ‘organise training set section’ to separate train and test folder. Then fit_generator can do its job naturally.
I think I’ll close the issue for now and we can take into account the
fit_generatorlater once the training data is much larger (e.g. we want to incorporate Wikipedia). The version that we have currently usingfitis pretty easy to read.