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

Method BuildTestModel

tensorflow/lite/toco/tflite/import_test.cc:123–136  ·  view source on GitHub ↗

This is a very simplistic model. We are not interested in testing all the details here, since tf.mini's testing framework will be exercising all the conversions multiple times, and the conversion of operators is tested by separate unittests.

Source from the content-addressed store, hash-verified

121 // conversions multiple times, and the conversion of operators is tested by
122 // separate unittests.
123 void BuildTestModel() {
124 auto buffers = BuildBuffers();
125 auto tensors = BuildTensors();
126 auto opcodes = BuildOpCodes();
127 auto operators = BuildOperators();
128 auto subgraphs = BuildSubGraphs(tensors, operators);
129 auto s = builder_.CreateString("");
130
131 ::tflite::FinishModelBuffer(
132 builder_, ::tflite::CreateModel(builder_, TFLITE_SCHEMA_VERSION,
133 opcodes, subgraphs, s, buffers));
134
135 input_model_ = ::tflite::GetModel(builder_.GetBufferPointer());
136 }
137 string InputModelAsString() {
138 return string(reinterpret_cast<char*>(builder_.GetBufferPointer()),
139 builder_.GetSize());

Callers

nothing calls this directly

Calls 3

FinishModelBufferFunction · 0.85
CreateModelFunction · 0.85
GetModelFunction · 0.85

Tested by

no test coverage detected