benderthon/tf_freeze.py
def save_graph_only_from_checkpoint(input_checkpoint, output_file_path, output_node_names, as_text=False):
    """Save a small version of the graph based on a checkpoint and the output node names."""
    check_input_checkpoint(input_checkpoint)

    output_node_names = output_node_names_string_as_list(output_node_names)

    with tf.Session() as sess:
        restore_from_checkpoint(sess, input_checkpoint)
        save_graph_only(sess, output_file_path, output_node_names, as_text=as_text)
def save_graph_only_from_checkpoint(input_checkpoint, output_file_path, output_node_names, as_text=False):
    check_input_checkpoint(input_checkpoint)

    output_node_names = output_node_names_string_as_list(output_node_names)

    with tf.Session() as sess:
        restore_from_checkpoint(sess, input_checkpoint)
        save_graph_only(sess, output_file_path, output_node_names, as_text=as_text)
def save_graph_only_from_checkpoint ( input_checkpoint , output_file_path , output_node_names , as_text = False ) : check_input_checkpoint ( input_checkpoint ) output_node_names = output_node_names_string_as_list ( output_node_names ) with tf . Session ( ) as sess : restore_from_checkpoint ( sess , input_checkpoint ) save_graph_only ( sess , output_file_path , output_node_names , as_text = as_text )
Save a small version of the graph based on a checkpoint and the output node names.
Save a small version of the graph based on a checkpoint and the output node names .