(self, sgv, dst_graph, dst_scope, src_scope)
| 326 | """ |
| 327 | |
| 328 | def __init__(self, sgv, dst_graph, dst_scope, src_scope): |
| 329 | self.sgv = sgv |
| 330 | self.sgv_inputs_set = frozenset(sgv.inputs) |
| 331 | self.ops = frozenset(sgv.ops) |
| 332 | self.control_outputs = util.ControlOutputs(sgv.graph) |
| 333 | self.graph = sgv.graph |
| 334 | self.scope = src_scope |
| 335 | self.graph_ = dst_graph |
| 336 | self.scope_ = dst_scope |
| 337 | self.transformed_ops = {} |
| 338 | self.transformed_ts = {} |
| 339 | self.collections = dict((key, self.graph.get_collection(key)) |
| 340 | for key in self.graph.get_all_collection_keys()) |
| 341 | self.cyclic_ops = [] |
| 342 | self.transform_original_op_handler = transform_op_if_inside_handler |
| 343 | # The graph is transformed op by op, in the same order the original ops |
| 344 | # were created. However, this is sometimes not possible due to cycles |
| 345 | # (i.e. while loops). So when the transformer creates a new op whose |
| 346 | # inputs do not exist yet, temporary placeholders are created and stored |
| 347 | # in this `tmp_cyclic_ts` container. During a second pass, |
| 348 | # those temporary tensors are replaced by the proper transformed tensors |
| 349 | # (see the function `_finalize_cycles`). |
| 350 | self.tmp_cyclic_ts = [] |
| 351 | |
| 352 | def new_name(self, name): |
| 353 | """Compute a destination name from a source name. |
nothing calls this directly
no test coverage detected