R Deep Learning Essentials
上QQ阅读APP看书,第一时间看更新

The epoch.end.callback parameter

This is a callback function that allows you to register another function that is called after n epochs. Deep learning models take a long time to train, so you need some feedback to know they are working correctly! You can write a custom callback function to do whatever you need, but usually it outputs to the screen or log after n epochs. This is equivalent to the code in our neural network that printed a diagnostic message every 500 epochs. The callback function can also be used to save the model to disk, for example, if you wanted to save the model before it begins to overfit.