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

Function main

tensorflow/lite/toco/python/toco_from_protos.py:57–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55
56
57def main():
58 global FLAGS
59 parser = argparse.ArgumentParser(
60 description="Invoke toco using protos as input.")
61 parser.add_argument(
62 "model_proto_file",
63 type=str,
64 help="File containing serialized proto that describes the model.")
65 parser.add_argument(
66 "toco_proto_file",
67 type=str,
68 help="File containing serialized proto describing how TOCO should run.")
69 parser.add_argument(
70 "model_input_file", type=str, help="Input model is read from this file.")
71 parser.add_argument(
72 "model_output_file",
73 type=str,
74 help="Result of applying TOCO conversion is written here.")
75 parser.add_argument(
76 "--debug_proto_file",
77 type=str,
78 default="",
79 help=("File containing serialized `GraphDebugInfo` proto that describes "
80 "logging information."))
81 parser.add_argument(
82 "--enable_mlir_converter",
83 action="store_true",
84 help=("Boolean indiciating whether to enable the MLIR converter instead "
85 "of TOCO converter. (default False)"))
86
87 FLAGS, unparsed = parser.parse_known_args()
88
89 app.run(main=execute, argv=[sys.argv[0]] + unparsed)
90
91
92if __name__ == "__main__":

Callers 1

Calls 3

add_argumentMethod · 0.80
parse_known_argsMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected