aboutsummaryrefslogtreecommitdiff
path: root/tests/MobileNetSsdInferenceTest.hpp
diff options
context:
space:
mode:
authorNarumol Prangnawarat <narumol.prangnawarat@arm.com>2019-02-15 17:34:51 +0000
committerNarumol Prangnawarat <narumol.prangnawarat@arm.com>2019-02-20 11:06:06 +0000
commitc8bab1bf601b00242b44cdbc7d9510a753054803 (patch)
tree05fa368fac3417cc30f34b791d165879f81ba1e8 /tests/MobileNetSsdInferenceTest.hpp
parentfab64f09f49280ce7e57837c8bc99de31089512c (diff)
downloadarmnn-c8bab1bf601b00242b44cdbc7d9510a753054803.tar.gz
IVGCVSW-2436 Modify MobileNet SSD inference test
* change MobileNet SSD input to uint8 * get quantization scale and offset from the model * change data layout to NHWC as TensorFlow lite layout * update expected output as result from TfLite with quantized data Change-Id: I07104d56286893935779169356234de53f1c9492 Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Diffstat (limited to 'tests/MobileNetSsdInferenceTest.hpp')
-rw-r--r--tests/MobileNetSsdInferenceTest.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/MobileNetSsdInferenceTest.hpp b/tests/MobileNetSsdInferenceTest.hpp
index 0091009083..10ee1dcae6 100644
--- a/tests/MobileNetSsdInferenceTest.hpp
+++ b/tests/MobileNetSsdInferenceTest.hpp
@@ -126,7 +126,7 @@ public:
}
private:
- static constexpr unsigned int k_NumDetections = 10u;
+ static constexpr unsigned int k_NumDetections = 1u;
static constexpr unsigned int k_OutputSize1 = k_NumDetections * 4u;
static constexpr unsigned int k_OutputSize2 = k_NumDetections;
@@ -169,8 +169,8 @@ public:
{
return false;
}
-
- m_Database = std::make_unique<MobileNetSsdDatabase>(m_DataDir.c_str());
+ std::pair<float, int32_t> qParams = m_Model->GetQuantizationParams();
+ m_Database = std::make_unique<MobileNetSsdDatabase>(m_DataDir.c_str(), qParams.first, qParams.second);
if (!m_Database)
{
return false;