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

Method new_name

tensorflow/contrib/graph_editor/transform.py:352–369  ·  view source on GitHub ↗

Compute a destination name from a source name. Args: name: the name to be "transformed". Returns: The transformed name. Raises: ValueError: if the source scope is used (that is, not an empty string) and the source name does not belong to the source scope.

(self, name)

Source from the content-addressed store, hash-verified

350 self.tmp_cyclic_ts = []
351
352 def new_name(self, name):
353 """Compute a destination name from a source name.
354
355 Args:
356 name: the name to be "transformed".
357 Returns:
358 The transformed name.
359 Raises:
360 ValueError: if the source scope is used (that is, not an empty string)
361 and the source name does not belong to the source scope.
362 """
363 scope = self.scope
364 if not name.startswith(scope):
365 raise ValueError("{} does not belong to source scope: {}.".format(
366 name, scope))
367 rel_name = name[len(scope):]
368 name_ = self.scope_ + rel_name
369 return name_
370
371
372class Transformer(object):

Callers 10

copy_op_handlerFunction · 0.45
AddSendFunction · 0.45
AddRecvFunction · 0.45
AddFuseRecvFunction · 0.45
AddDummyConstFunction · 0.45
AddControlTriggerFunction · 0.45
AddControlLoopFunction · 0.45
AddControlFlowFunction · 0.45
UseFuseRecvInternalMethod · 0.45

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected