| 281 | } |
| 282 | |
| 283 | int LITE_get_discrete_tensor( |
| 284 | LiteNetwork network, const char* io_name, size_t n_idx, LiteTensorPhase phase, |
| 285 | LiteTensor* tensor) { |
| 286 | LITE_CAPI_BEGIN(); |
| 287 | LITE_ASSERT(network, "The network pass to LITE api is null"); |
| 288 | auto io_tensors = |
| 289 | static_cast<lite::Network*>(network)->get_discrete_tensors(io_name, phase); |
| 290 | LITE_ASSERT( |
| 291 | n_idx < io_tensors.size(), "n_idx should be less than %zu", |
| 292 | io_tensors.size()); |
| 293 | *tensor = io_tensors[n_idx].get(); |
| 294 | LITE_CAPI_END(); |
| 295 | } |
| 296 | |
| 297 | int LITE_get_input_name(const LiteNetwork network, size_t index, const char** name) { |
| 298 | LITE_CAPI_BEGIN(); |