August 2018
Intermediate to advanced
378 pages
9h 9m
English
Now that we have built our deep learning model, we can restart R and reload the model from disk. The code for this section is in the Chapter11/use_cifar10_model.R folder. We will load the model that was created in the previous section by using the following code:
library(keras)# load model trained in build_cifar10_model.Rmodel <- load_model_hdf5("cifar_model.h5")
We will use this model to generate a prediction for an image file from the validation set. We will pick the first directory in the validation folder and then pick the 7th file from that folder. We load the image and apply the same preprocessing to it as we did when preprocessing the images during training, which is to normalize the data by dividing ...
Read now
Unlock full access