在这里,无涯教程将重点介绍TensorFlow中的MetaGraph形成,这将帮助了解TensorFlow中的导出模块,MetaGraph包含基本信息,这是训练,执行判断或对先前训练过的图进行推理所必需的。
def export_meta_graph(filename=None, collection_list=None, as_text=False): """this code writes `MetaGraphDef` to save_path/filename. Arguments: filename: Optional meta_graph filename including the path. collection_list: List of string keys to collect. as_text: If `True`, writes the meta_graph as an ASCII proto. Returns: A `MetaGraphDef` proto. """
下面是其中一种典型的使用模式-
# 建立模型... with tf.Session() as sess: # 使用模型... # 将模型导出到 /tmp/my-model.meta。 meta_graph_def=tf.train.export_meta_graph(filename='/tmp/my-model.meta')
这一章《TensorFlow - 导出》你学到了什么?在下面做个笔记吧!做站不易,你的分享是对我们最大的支持,感谢!😊
有没有一种好方法可以将 pandas 列多索引转换为列类别?
如何将过滤的分组聚合的结果分配为原始 Pandas DataFrame 中的新...
TypeError:从文件中读取参数时,函数缺少所需的位置参数