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

Method BuildFromFile

tensorflow/lite/model.cc:78–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78std::unique_ptr<FlatBufferModel> FlatBufferModel::BuildFromFile(
79 const char* filename, ErrorReporter* error_reporter) {
80 error_reporter = ValidateErrorReporter(error_reporter);
81
82 std::unique_ptr<FlatBufferModel> model;
83 auto allocation = GetAllocationFromFile(filename, /*mmap_file=*/true,
84 error_reporter, /*use_nnapi=*/true);
85 model.reset(new FlatBufferModel(std::move(allocation), error_reporter));
86 if (!model->initialized()) model.reset();
87 return model;
88}
89
90std::unique_ptr<FlatBufferModel> FlatBufferModel::VerifyAndBuildFromFile(
91 const char* filename, TfLiteVerifier* extra_verifier,

Callers

nothing calls this directly

Calls 4

ValidateErrorReporterFunction · 0.85
GetAllocationFromFileFunction · 0.85
resetMethod · 0.45
initializedMethod · 0.45

Tested by

no test coverage detected