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.
| 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()); |
nothing calls this directly
no test coverage detected