diff options
Diffstat (limited to 'applications')
-rw-r--r-- | applications/inference_process/src/inference_process.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/applications/inference_process/src/inference_process.cpp b/applications/inference_process/src/inference_process.cpp index a5bf642..3cbc8e0 100644 --- a/applications/inference_process/src/inference_process.cpp +++ b/applications/inference_process/src/inference_process.cpp @@ -158,11 +158,6 @@ bool InferenceProcess::runJob(InferenceJob &job) { tflite::ArmProfiler profiler; tflite::MicroInterpreter interpreter(model, resolver, tensorArena, tensorArenaSize, nullptr, &profiler); - // Set external context - if (job.externalContext != nullptr) { - interpreter.SetMicroExternalContext(job.externalContext); - } - // Allocate tensors TfLiteStatus status = interpreter.AllocateTensors(); if (status != kTfLiteOk) { @@ -170,6 +165,11 @@ bool InferenceProcess::runJob(InferenceJob &job) { return true; } + // Set external context + if (job.externalContext != nullptr) { + interpreter.SetMicroExternalContext(job.externalContext); + } + // Copy IFM data from job descriptor to TFLu arena if (copyIfm(job, interpreter)) { return true; |