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

Method function_name

tensorflow/python/autograph/core/naming.py:90–101  ·  view source on GitHub ↗

Returns the name of a converted function.

(self, original_fqn)

Source from the content-addressed store, hash-verified

88 return new_name
89
90 def function_name(self, original_fqn):
91 """Returns the name of a converted function."""
92 canonical_name = self._as_symbol_name(
93 original_fqn, style=_NamingStyle.SNAKE)
94 new_name_root = 'tf__%s' % canonical_name
95 new_name = new_name_root
96 n = 0
97 while new_name in self.global_namespace:
98 n += 1
99 new_name = '%s_%d' % (new_name_root, n)
100 self.generated_names.add(new_name)
101 return new_name
102
103 def new_symbol(self, name_root, reserved_locals):
104 """See control_flow.SymbolNamer.new_symbol."""

Callers 12

convert_func_to_astFunction · 0.95
AddGradientDefHelperMethod · 0.80
AddLibraryMethod · 0.80
ReplaceGradientMethod · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
GetGradDefsFunction · 0.80

Calls 2

_as_symbol_nameMethod · 0.95
addMethod · 0.45

Tested by 7

TEST_FFunction · 0.64
TEST_FFunction · 0.64
GetGradDefsFunction · 0.64