user1700890
user1700890

Reputation: 7730

What are the assets in 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.

What does assets in this context mean?

Also another paragraphs says:

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.

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

Here is the tutorial

Upvotes: 3

Views: 3355

Answers (1)

Zoe
Zoe

Reputation: 1410

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

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

#########

More to your question:

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

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.

Upvotes: 4

Related Questions