summaryrefslogtreecommitdiff
path: root/tests/use_case/img_class/InferenceTestMobilenetV2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/use_case/img_class/InferenceTestMobilenetV2.cc')
-rw-r--r--tests/use_case/img_class/InferenceTestMobilenetV2.cc20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/use_case/img_class/InferenceTestMobilenetV2.cc b/tests/use_case/img_class/InferenceTestMobilenetV2.cc
index 7e7508b..30ce19f 100644
--- a/tests/use_case/img_class/InferenceTestMobilenetV2.cc
+++ b/tests/use_case/img_class/InferenceTestMobilenetV2.cc
@@ -18,9 +18,19 @@
#include "MobileNetModel.hpp"
#include "TensorFlowLiteMicro.hpp"
#include "TestData_img_class.hpp"
+#include "BufAttributes.hpp"
#include <catch.hpp>
+namespace arm {
+ namespace app {
+ static uint8_t tensorArena[ACTIVATION_BUF_SZ] ACTIVATION_BUF_ATTRIBUTE;
+ } /* namespace app */
+} /* namespace arm */
+
+extern uint8_t* GetModelPointer();
+extern size_t GetModelLen();
+
using namespace test;
bool RunInference(arm::app::Model& model, const int8_t imageData[])
@@ -67,7 +77,10 @@ TEST_CASE("Running inference with TensorFlow Lite Micro and MobileNeV2 Uint8", "
arm::app::MobileNetModel model{};
REQUIRE_FALSE(model.IsInited());
- REQUIRE(model.Init());
+ REQUIRE(model.Init(arm::app::tensorArena,
+ sizeof(arm::app::tensorArena),
+ GetModelPointer(),
+ GetModelLen()));
REQUIRE(model.IsInited());
for (uint32_t i = 0 ; i < NUMBER_OF_IFM_FILES; ++i) {
@@ -81,7 +94,10 @@ TEST_CASE("Running inference with TensorFlow Lite Micro and MobileNeV2 Uint8", "
arm::app::MobileNetModel model{};
REQUIRE_FALSE(model.IsInited());
- REQUIRE(model.Init());
+ REQUIRE(model.Init(arm::app::tensorArena,
+ sizeof(arm::app::tensorArena),
+ GetModelPointer(),
+ GetModelLen()));
REQUIRE(model.IsInited());
TestInference<uint8_t>(i, model, 1);