| 268 | } |
| 269 | |
| 270 | TfLiteTensor* MicroInterpreter::input(size_t index) { |
| 271 | const flatbuffers::Vector<int32_t>* inputs = subgraph_->inputs(); |
| 272 | const size_t length = inputs->size(); |
| 273 | if ((index < 0) || (index >= length)) { |
| 274 | error_reporter_->Report("Input index %d out of range (length is %d)", index, |
| 275 | length); |
| 276 | return nullptr; |
| 277 | } |
| 278 | return &(context_.tensors[inputs->Get(index)]); |
| 279 | } |
| 280 | |
| 281 | TfLiteTensor* MicroInterpreter::output(size_t index) { |
| 282 | const flatbuffers::Vector<int32_t>* outputs = subgraph_->outputs(); |