MCPcopy Create free account
hub / github.com/tensorflow/tensorboard / _prefixed_func_name

Function _prefixed_func_name

tensorboard/plugins/graph/graph_util.py:24–39  ·  view source on GitHub ↗

Returns function name prefixed with `prefix`. For function libraries, which are often created out of autographed Python function, are factored out in the graph vis. They are grouped under a function name which often has a shape of `__inference_[py_func_name]_[numeric_suffix]`.

(prefix, func_name)

Source from the content-addressed store, hash-verified

22
23
24def _prefixed_func_name(prefix, func_name):
25 """Returns function name prefixed with `prefix`.
26
27 For function libraries, which are often created out of autographed Python
28 function, are factored out in the graph vis. They are grouped under a
29 function name which often has a shape of
30 `__inference_[py_func_name]_[numeric_suffix]`.
31
32 While it does not have some unique information about which graph it is from,
33 creating another wrapping structure with graph prefix and "/" is less than
34 ideal so we join the prefix and func_name using underscore.
35
36 TODO(stephanwlee): add business logic to strip "__inference_" for more user
37 friendlier name
38 """
39 return "%s_%s" % (prefix, func_name)
40
41
42def _add_with_prepended_names(prefix, graph_to_add, destination_graph):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…