| /* | |
| * Copyright 2023 Google LLC | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, | |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| * See the License for the specific language governing permissions and | |
| * limitations under the License. | |
| */ | |
| #ifndef QUANT_MODELS_IREE_EXEC_HPS_H_ | |
| #define QUANT_MODELS_IREE_EXEC_HPS_H_ | |
| #include "model_util/util.h" | |
| typedef struct { | |
| int8_t score_0; | |
| int8_t score_1; | |
| } HpsOutput; | |
| const MlModel kModel = { | |
| .num_input = 1, | |
| .num_input_dim = {4}, | |
| .input_shape = {{1, 240, 320, 1}}, | |
| .input_length = {240 * 320 * 1}, | |
| .input_size_bytes = {sizeof(int8_t)}, | |
| .num_output = 1, | |
| .output_length = {2}, | |
| .output_size_bytes = sizeof(int8_t), | |
| .hal_element_type = IREE_HAL_ELEMENT_TYPE_SINT_8, | |
| .entry_func = "module.main", | |
| .model_name = "hps_quant", | |
| }; | |
| #endif // QUANT_MODELS_IREE_EXEC_HPS_H_ |