tensorflow 中有哪些资产? [英] What are the assets in tensorflow?

查看:54
本文介绍了tensorflow 中有哪些资产?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读有关保存和恢复模型的 tensorflow 教程并遇到以下语句:

I am reading tensorflow tutorial on saving and restoring model and came across the following statement:

  If assets need to be saved and written or copied to disk,
 they can be provided when the first MetaGraphDef is added. If multiple 
 MetaGraphDefs are associated with an asset of the same name,
 only the first version is retained.

assets 在这个上下文中是什么意思?

What does assets in this context mean?

还有一段说:

We provide a Python implementation of the SavedModel builder. 
The SavedModelBuilder class provides functionality to save multiple MetaGraphDefs.
 A MetaGraph is a dataflow graph, plus its associated variables, assets,
 and signatures. A MetaGraphDef is the protocol buffer representation of
 a MetaGraph. A signature is the set of inputs to and outputs from a graph.

什么是数据流图,它与graph有什么不同?

What is dataflow graph and how is it different from graph?

这是教程

推荐答案

TL;DR保存 Tensorflow 模型时,您只需要知道创建了两个文件(如果您使用检查点,可能会创建更多):

TL;DR All you need to know when saving a Tensorflow model is that there are two files that are created (potentially more if you're using checkpoints):

file
file.meta

您保存文件"并恢复file.meta".更多信息:Tensorflow:如何保存/恢复模型?

you save 'file' and restore 'file.meta'. More info here: Tensorflow: how to save/restore a model?

更多关于您的问题:

您在运行会话之前在 Tensorflow 中定义的内容称为图.

what you define in Tensorflow before you run your session is called a graph.

当您保存图形时,会创建一个 MetaGraph.这是图本身,以及该图中计算所需的所有其他元数据,以及一些可以保存的用户信息和版本规范.

When you are saving your graph, a MetaGraph is created. This is the graph itself, and all the other metadata necessary for computations in this graph, as well as some user info that can be saved and version specification.

资产是外部文件,例如使用图表创建的词汇表.

Assets are external files, such as vocabularies that were created with the graph.

这篇关于tensorflow 中有哪些资产?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆