Contains standard names to use for graph collections.
Contains standard names to use for graph collections.
The standard library uses various well-known names to collect and retrieve values associated with a graph. For
example, the optimizers default to optimizing the variables collected under Graph.Keys.TRAINABLE_VARIABLES
if
none is specified, but it is also possible to pass an explicit list of variables.
Note: Whenever a new key is added, appropriate edits need to be made to the Keys.fromName function.
Constructs and returns an empty new graph.
Copies a graph and its meta-information from fromGraph
to toGraph
, according to the provided scopes.
Copies a graph and its meta-information from fromGraph
to toGraph
, according to the provided scopes.
From/source graph.
To/destination graph.
From/source name scope. Only ops within this name scope are copied.
To/destination name scope. The copied ops are placed under this name scope in toGraph
.
Imports a graph from the provided serialized graph object.
Imports a graph from the provided serialized graph object.
Serialized representation of the graph that will be imported.
Optional prefix that will be prepended to all node names in the graph that is being imported to this graph.
Constructed Graph object.
Imports a graph and its meta-information from the provided serialized graph meta-information object.
Imports a graph and its meta-information from the provided serialized graph meta-information object.
This function takes a MetaGraphDef protocol buffer as input and it adds all the nodes from its graph_def
field to a new graph. It also recreates the desired collections stored in that protocol buffer.
In combination with Graph.toMetaGraphDef, this function can be used to:
Serialized representation of the graph and its meta-information, that will be imported into the new graph.
Optional prefix that will be prepended to all node names in the graph that is being imported to the new graph.
Boolean value indicating whether to clear the device information from the returned node definition.
Collection key for looking up unbound inputs.
Function that takes as input a graph collection key and returns a boolean
value indicating whether or not to load that collection. Note that the
collection specified by unboundInputsCollectionKey
is never loaded.
Defaults to a function that returns true
for all inputs.
Constructed Graph object.
Imports a graph from the provided serialized graph object.
Imports a graph from the provided serialized graph object.
Serialized representation of the graph that will be imported.
Optional prefix that will be prepended to all node names in the graph that is being imported to this graph.
Constructed Graph object.