35 assert(opcode !=
nullptr);
36 return std::max(opcode->builtin_code(),
37 static_cast<::tflite::BuiltinOperator
>(opcode->deprecated_builtin_code()));
40bool is_valid(const ::tflite::OperatorCode *opcode)
43 const int8_t deprecated_builtin_code = opcode->deprecated_builtin_code();
44 if (deprecated_builtin_code < 0)
47 const ::tflite::BuiltinOperator builtin_code = opcode->builtin_code();
48 if (!(::tflite::BuiltinOperator_MIN <= builtin_code &&
49 builtin_code <= ::tflite::BuiltinOperator_MAX))