October 2018
Intermediate to advanced
472 pages
10h 57m
English
This gets us to the exciting part of our generative language model—creating custom content! The inference step in deep learning is where we take a trained model and expose it to new data to make predictions or classifications. In the current context of this project, we're looking for model outputs, that is, new sentences, which will be our novel custom content. Let's see what our deep learning model can do!
We will use the following code to store and load the checkpoints into a binary file that stores all of the weights:
from keras.callbacks import ModelCheckpointfilepath="weights-{epoch:02d}-{loss:.4f}.hdf5"checkpoint = ModelCheckpoint(filepath, monitor='loss', verbose=1, save_best_only=True, mode='min')callbacks_list ...Read now
Unlock full access