From the course: TensorFlow: Practical Skills in Constructing, Training, and Optimizing Models
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Save and restore models - TensorFlow Tutorial
From the course: TensorFlow: Practical Skills in Constructing, Training, and Optimizing Models
Save and restore models
- [Instructor] Training and optimizing a model can be expensive, both in terms of time and computations. So, what happens when you want to stop for the night? Do you have to retrain your high-performing model all over again the next day? No, you can save your model and then reload it when you need it again. In this lesson, I'll walk you through how to save and reload models once you've got them where you want them. TensorFlow saves a lot of information about its models, which can in turn save you a lot of time and spare you the trouble of having to rebuild and retrain models from scratch. You can save the architecture of the model, the values of the weights or parameters after training, which optimizer you want to use, and which losses and metrics you'll be measuring. Remember that these last two bits are determined when you compile the model. Open up the 03_04_Save.ipynb notebook. I start as usual by importing TensorFlow and NumPy. Suppose that I've got my model compiled and trained…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.