contrib.graph_editor.transform_op_if_inside_handler
tf.contrib.graph_editor.transform_op_if_inside_handler
tf.contrib.graph_editor.transform_op_if_inside_handler
transform_op_if_inside_handler( info, op, keep_if_possible=True )
Defined in tensorflow/contrib/graph_editor/transform.py
.
See the guide: Graph Editor (contrib) > Module: transform
Transform an optional op only if it is inside the subgraph.
This handler is typically use to handle original op: it is fine to keep them if they are inside the subgraph, otherwise they are just ignored.
Args:
-
info
: Transform._TmpInfo instance. -
op
: the optional op to transform (or ignore). -
keep_if_possible
: re-attach to the original op if possible, that is, if the source graph and the destination graph are the same.
Returns:
The transformed op or None.
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/graph_editor/transform_op_if_inside_handler