February 2020
Intermediate to advanced
328 pages
8h 19m
English
Training a deep learning model is a time-consuming task. If training stops unexpectedly, we can lose a lot of our work. The keras library in R provides us with the functionality to save a model's progress during and after training. A saved model contains the weight values, the model's configuration, and the optimizer's configuration. If the training process is interrupted somehow, we can pick up training from there.
The following code block shows how we can save the model after training:
# Save modelmodel_sequential %>% save_model_hdf5("my_model.h5")
If we want to save the model after each iteration while training, we need to create a checkpoint object. To perform this task, we use the callback_model_checkpoint() function. ...
Read now
Unlock full access