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

Method _assign_from

tensorflow/contrib/graph_editor/subgraph.py:234–252  ·  view source on GitHub ↗

Assign other to itself. Args: other: another subgraph-view. Returns: A new instance identical to the original one. Raises: TypeError: if other is not an SubGraphView.

(self, other)

Source from the content-addressed store, hash-verified

232 return result
233
234 def _assign_from(self, other):
235 """Assign other to itself.
236
237 Args:
238 other: another subgraph-view.
239 Returns:
240 A new instance identical to the original one.
241 Raises:
242 TypeError: if other is not an SubGraphView.
243 """
244 if not isinstance(other, SubGraphView):
245 raise TypeError("Expected SubGraphView, got: {}".format(type(other)))
246 # pylint: disable=protected-access
247 self._graph = other._graph
248 self._ops = list(other._ops)
249 self._passthrough_ts = list(other._passthrough_ts)
250 self._input_ts = list(other._input_ts)
251 self._output_ts = list(other._output_ts)
252 # pylint: enable=protected-access
253
254 def copy(self):
255 """Return a copy of itself.

Callers 1

_reroute_sgv_remapFunction · 0.80

Calls 2

typeFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected