benderthon/tf_freeze.py
def save_graph_only(sess, output_file_path, output_node_names, as_text=False):
    """Save a small version of the graph based on a session and the output node names."""
    for node in sess.graph_def.node:
        node.device = ''
    graph_def = graph_util.extract_sub_graph(sess.graph_def, output_node_names)
    output_dir, output_filename = os.path.split(output_file_path)
    graph_io.write_graph(graph_def, output_dir, output_filename, as_text=as_text)
def save_graph_only(sess, output_file_path, output_node_names, as_text=False):
    for node in sess.graph_def.node:
        node.device = ''
    graph_def = graph_util.extract_sub_graph(sess.graph_def, output_node_names)
    output_dir, output_filename = os.path.split(output_file_path)
    graph_io.write_graph(graph_def, output_dir, output_filename, as_text=as_text)
def save_graph_only ( sess , output_file_path , output_node_names , as_text = False ) : for node in sess . graph_def . node : node . device = '' graph_def = graph_util . extract_sub_graph ( sess . graph_def , output_node_names ) output_dir , output_filename = os . path . split ( output_file_path ) graph_io . write_graph ( graph_def , output_dir , output_filename , as_text = as_text )
Save a small version of the graph based on a session and the output node names.
Save a small version of the graph based on a session and the output node names .