| 102 | } |
| 103 | |
| 104 | void SingleOpModel::SetCustomOp( |
| 105 | const string& name, const std::vector<uint8_t>& custom_option, |
| 106 | const std::function<TfLiteRegistration*()>& registration) { |
| 107 | custom_registrations_[name] = registration; |
| 108 | opcodes_.push_back( |
| 109 | CreateOperatorCodeDirect(builder_, BuiltinOperator_CUSTOM, name.data())); |
| 110 | operators_.push_back(CreateOperator( |
| 111 | builder_, /*opcode_index=*/0, builder_.CreateVector<int32_t>(inputs_), |
| 112 | builder_.CreateVector<int32_t>(outputs_), BuiltinOptions_NONE, 0, |
| 113 | builder_.CreateVector<uint8_t>(custom_option), |
| 114 | CustomOptionsFormat_FLEXBUFFERS)); |
| 115 | } |
| 116 | |
| 117 | void SingleOpModel::BuildInterpreter(std::vector<std::vector<int>> input_shapes, |
| 118 | int num_threads, |
nothing calls this directly
no test coverage detected