1. Using models
Now that you can build basic deep learning models, I'll show you how to use them. Then we'll go into some finer details on fine tuning model architectures. The things you'll want to do in order to use these models
2. Using models
are: save a model after you've trained it, reload that model, make predictions with the model.
3. Saving, reloading, and using your Model
Here is the code to save a model, reload it, and make predictions. We've imported a load_model function here. Once I have a model I want to save, I can save it with the "save" method. I supply a filename. Models are saved in a format called hdf5, for which h5 is the common extension. I then load the model back into memory with the load_model function here. I then make predictions. The model I've loaded here is a classification model. The predictions come in the same format as the prediction target. You may recall that this had 1 column for whether the shot was missed, and then a 2nd column for whether the shot was made. In practice, I probably only want the probability that the shot is made. So, I'll extract that second column with numpy indexing, and I called that probability_true. Lastly, sometimes I'll want to verify that the model I loaded has the same structure I expect.
4. Verifying model structure
You can print out a summary of the model architecture with the summary method. You can see the output here. Now that you can save your model, reload it, make predictions, and verify its structure, you have most of what you need to not just build models, but to work with them in practical situations.
5. Let's practice!