1 /* 2 * Copyright (c) 2023-2024 Tomeu Vizoso <[email protected]> 3 * SPDX-License-Identifier: MIT 4 */ 5 6 enum executor { 7 EXECUTOR_CPU, 8 EXECUTOR_NPU, 9 }; 10 11 struct TfLiteModel; 12 13 std::vector<uint8_t> conv2d_generate_model(int input_size, 14 int weight_size, 15 int input_channels, 16 int output_channels, 17 int stride, 18 bool padding_same, 19 bool is_signed, 20 bool depthwise); 21 22 std::vector<uint8_t> add_generate_model(int input_size, 23 int weight_size, 24 int input_channels, 25 int output_channels, 26 int stride, 27 bool padding_same, 28 bool is_signed, 29 bool depthwise); 30 31 std::vector<std::vector<uint8_t>> run_model(TfLiteModel *model, enum executor executor, std::vector<std::vector<uint8_t>> &input);