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

Function _read_graph_def

tensorflow/lite/python/create_custom_op.py:60–67  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

58
59
60def _read_graph_def(filename):
61 if not gfile.Exists(filename):
62 raise ValueError("Input graph file '" + filename + "' does not exist!")
63
64 graph_def = graph_pb2.GraphDef()
65 with gfile.GFile(filename, "rb") as f:
66 graph_def.ParseFromString(f.read())
67 return graph_def
68
69
70def _write_graph_def(graph_def, filename):

Callers 1

mainFunction · 0.85

Calls 3

ExistsMethod · 0.45
ParseFromStringMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected