November 2019
Intermediate to advanced
296 pages
7h 52m
English
If you want to export a complicated model in a more fine-grained manner, SavedModelBuilder is the API you can use, as the API has the functionality to save multiple MetaGraphDef instances, as shown in the first diagram. It is a general way to export a more compact and efficient model. It is also able to contain some assets that are auxiliary files, such as vocabulary for an NLP application. Each MetaGraphDef in SavedModel should be attached to user-defined tags in order to identify the specific model to load when it is used. By using annotation, you can also use SavedModel in different use cases. For example, you can contain models for fine-tuning and inference in one SavedModel file:
export_dir = './model_builder' ...
Read now
Unlock full access