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

Function main

tensorflow/lite/tools/gen_op_registration_main.cc:98–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96} // namespace
97
98int main(int argc, char** argv) {
99 string input_model;
100 string output_registration;
101 string tflite_path;
102 ParseFlagAndInit(argc, argv, &input_model, &output_registration,
103 &tflite_path);
104
105 std::vector<string> builtin_ops;
106 std::vector<string> custom_ops;
107 std::ifstream fin(input_model);
108 std::stringstream content;
109 content << fin.rdbuf();
110 // Need to store content data first, otherwise, it won't work in bazel.
111 string content_str = content.str();
112 const ::tflite::Model* model = ::tflite::GetModel(content_str.data());
113 ::tflite::ReadOpsFromModel(model, &builtin_ops, &custom_ops);
114 GenerateFileContent(tflite_path, output_registration, builtin_ops,
115 custom_ops);
116 return 0;
117}

Callers

nothing calls this directly

Calls 5

ParseFlagAndInitFunction · 0.85
GetModelFunction · 0.85
ReadOpsFromModelFunction · 0.85
GenerateFileContentFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected