tf.contrib.copy_graph.copy_op_to_graph
copy_op_to_graph(
org_instance,
to_graph,
variables,
scope=''
)
Defined in tensorflow/contrib/copy_graph/python/util/copy_elements.py.
Given an Operation 'org_instancefrom oneGraph,
initializes and returns a copy of it from anotherGraph,
under the specified scope (default""`).
The copying is done recursively, so any Operation whose output
is required to evaluate the org_instance, is also copied (unless
already done).
Since Variable instances are copied separately, those required
to evaluate org_instance must be provided as input.
Args:
org_instance: AnOperationfrom someGraph. Could be aPlaceholderas well.to_graph: TheGraphto copyorg_instanceto.variables: An iterable ofVariableinstances to copyorg_instanceto.scope: A scope for the newVariable(default"").
Returns:
The copied Operation from to_graph.
Raises:
TypeError: Iforg_instanceis not anOperationorTensor.
