Before introducing the SavedModel API, TensorFlow mainly used the frozen graphs format. In practice, a SavedModel is a wrapper around a frozen graph. The former includes more metadata and can include the preprocessing function needed to serve the model. While SavedModel is gaining in popularity, some libraries still require frozen models.
To convert a SavedModel to a frozen graph, the following code can be used:
from tensorflow.python.tools import freeze_graph
output_node_names = ['dense/Softmax']
input_saved_model_dir = './saved_model_dir'
input_binary = False
input_saver_def_path = False
restore_op_name = None
filename_tensor_name = None
clear_devices = True
input_meta_graph = False
checkpoint_path = None
input_graph_filename = None
saved_model_tags = tag_constants.SERVING
freeze_graph.freeze_graph(input_graph_filename, input_saver_def_path,
input_binary, checkpoint_path, output_node_names,
restore_op_name...