MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _copy_ops

Method _copy_ops

tensorflow/contrib/graph_editor/transform.py:461–477  ·  view source on GitHub ↗

Copy ops without connecting them.

(self, info)

Source from the content-addressed store, hash-verified

459 return sgv_, res_info
460
461 def _copy_ops(self, info):
462 """Copy ops without connecting them."""
463 sorted_ops = sorted(info.sgv.ops, key=lambda op: op._id) # pylint: disable=protected-access
464 for op in sorted_ops:
465 new_inputs = [self._transformed_t(info, t, op) for t in op.inputs]
466 op_, op_outputs_ = self.transform_op_handler(info, op, new_inputs)
467 if op is op_:
468 raise ValueError("In-place transformation not allowed.")
469
470 # Process op.
471 info.transformed_ops[op] = op_
472 self.assign_collections_handler(info, op, op_)
473
474 # Process output tensors.
475 for op_output, op_output_ in zip(op.outputs, op_outputs_):
476 info.transformed_ts[op_output] = op_output_
477 self.assign_collections_handler(info, op_output, op_output_)
478
479 def _finalize_cycles(self, info):
480 """Reconnects the cyclic tensors."""

Callers 1

__call__Method · 0.95

Calls 1

_transformed_tMethod · 0.95

Tested by

no test coverage detected