diff options
Diffstat (limited to 'applications/inference_process/src/inference_process.cpp')
-rw-r--r-- | applications/inference_process/src/inference_process.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/applications/inference_process/src/inference_process.cpp b/applications/inference_process/src/inference_process.cpp index 4c65005..4ab0353 100644 --- a/applications/inference_process/src/inference_process.cpp +++ b/applications/inference_process/src/inference_process.cpp @@ -171,7 +171,9 @@ bool InferenceProcess::runJob(InferenceJob &job) { model, resolver, tensorArena, tensorArenaSize, &errorReporter, nullptr, &profiler); // Set external context - interpreter.SetMicroExternalContext(job.externalContext); + if (job.externalContext != nullptr) { + interpreter.SetMicroExternalContext(job.externalContext); + } // Allocate tensors TfLiteStatus status = interpreter.AllocateTensors(); |