| 38 | } |
| 39 | |
| 40 | void LoadOperatorsTable(const ::tflite::Model& input_model, |
| 41 | OperatorsTable* operators_table) { |
| 42 | auto opcodes = input_model.operator_codes(); |
| 43 | if (!opcodes) return; |
| 44 | for (const auto* opcode : *opcodes) { |
| 45 | if (opcode->builtin_code() != ::tflite::BuiltinOperator_CUSTOM) { |
| 46 | operators_table->push_back( |
| 47 | EnumNameBuiltinOperator(opcode->builtin_code())); |
| 48 | } else { |
| 49 | operators_table->push_back(opcode->custom_code()->c_str()); |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | } // namespace details |
| 54 | |
| 55 | void ImportTensors(const ::tflite::Model& input_model, Model* model) { |