tf.contrib.graph_editor.Transformer
Stay organized with collections
Save and categorize content based on your preferences.
Transform a subgraph into another one.
tf.contrib.graph_editor.Transformer()
By default, the constructor create a transform which copy a subgraph and
replaces inputs with placeholders. This behavior can be modified by changing
the handlers.
Methods
__call__
View source
__call__(
sgv, dst_graph, dst_scope, src_scope='', reuse_dst_scope=False
)
Execute the transformation.
Args |
sgv
|
the source subgraph-view.
|
dst_graph
|
the destination graph.
|
dst_scope
|
the destination scope.
|
src_scope
|
the source scope, which specify the path from which the
relative path of the transformed nodes are computed. For instance, if
src_scope is a/ and dst_scoped is b/, then the node a/x/y will have a
relative path of x/y and will be transformed into b/x/y.
|
reuse_dst_scope
|
if True the dst_scope is re-used if it already exists.
Otherwise, the scope is given a unique name based on the one given
by appending an underscore followed by a digit (default).
|
Returns |
A tuple (sgv, info) where:
sgv is the transformed subgraph view;
info is an instance of TransformerInfo containing
information about the transform, including mapping between
original and transformed tensors and operations.
|
Raises |
ValueError
|
if the arguments are invalid.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-01 UTC."],[],[]]