diff options
author | alexander <alexander.efremov@arm.com> | 2021-05-04 20:46:08 +0100 |
---|---|---|
committer | Isabella Gottardi <isabella.gottardi@arm.com> | 2021-05-05 10:58:09 +0000 |
commit | 27b62d9dec86b76422c6c8be7615c1f712518570 (patch) | |
tree | c0bc0d805f1a88e1d92619b2bb50572b688ec126 /source/use_case/kws/src | |
parent | c350cdced0a8a2ca17376f58813e6d48d796ac7c (diff) | |
download | ml-embedded-evaluation-kit-27b62d9dec86b76422c6c8be7615c1f712518570.tar.gz |
If inference fails - exit before printing results.
It was easy to miss error message and mistakenly assume that execution succeeded.
Signed-off-by: alexander <alexander.efremov@arm.com>
Change-Id: I3c7beb5afe97db5df486e12e3bfe0e8e27e382f8
Diffstat (limited to 'source/use_case/kws/src')
-rw-r--r-- | source/use_case/kws/src/UseCaseHandler.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/use_case/kws/src/UseCaseHandler.cc b/source/use_case/kws/src/UseCaseHandler.cc index 4011df6..d61985d 100644 --- a/source/use_case/kws/src/UseCaseHandler.cc +++ b/source/use_case/kws/src/UseCaseHandler.cc @@ -216,7 +216,9 @@ namespace app { audioDataSlider.TotalStrides() + 1); /* Run inference over this audio clip sliding window. */ - arm::app::RunInference(model, profiler); + if (!RunInference(model, profiler)) { + return false; + } std::vector<ClassificationResult> classificationResult; auto& classifier = ctx.Get<KwsClassifier&>("classifier"); |