tf_freeze.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:benderthon 作者: xmartlabs 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号