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

Function _graph_string

tensorflow/python/profiler/model_analyzer.py:51–56  ·  view source on GitHub ↗

Helper to serialize a graph to string.

(graph)

Source from the content-addressed store, hash-verified

49
50
51def _graph_string(graph):
52 """Helper to serialize a graph to string."""
53 if graph:
54 return graph.as_graph_def(add_shapes=True).SerializeToString()
55 else:
56 return b''
57
58
59def _build_options(options):

Callers 4

__init__Method · 0.85
add_stepMethod · 0.85
profileFunction · 0.85
adviseFunction · 0.85

Calls 2

as_graph_defMethod · 0.80
SerializeToStringMethod · 0.45

Tested by

no test coverage detected