December 2018
Intermediate to advanced
274 pages
7h 46m
English
Once we have the frozen graph, we can further optimize the file for inference-only purposes by removing the parts of the graph that are only needed during training. According to the documentation, this includes:
TensorFlow provides optimize_for_inference_lib in tensorflow.python.tools for this purpose:
# Optimize for inference input_graph_def = tf.GraphDef() with tf.gfile.Open(output_frozen_graph_name, "r") as f: data = f.read() input_graph_def.ParseFromString(data) ...
Read now
Unlock full access