aboutsummaryrefslogtreecommitdiff
path: root/tests/DeepSpeechV1InferenceTest.hpp
diff options
context:
space:
mode:
authorColm Donelan <Colm.Donelan@arm.com>2020-10-29 11:39:14 +0000
committerJim Flynn <jim.flynn@arm.com>2020-10-29 19:24:16 +0000
commit9a5ce4ab5ce777ef683035a4d0f4fcac67847c88 (patch)
tree5989f29900208e1cbc12d7592824776fd6dfa992 /tests/DeepSpeechV1InferenceTest.hpp
parent06e0300ccf279c6b0fcbb5ef3b6fa36e00229492 (diff)
downloadarmnn-9a5ce4ab5ce777ef683035a4d0f4fcac67847c88.tar.gz
IVGCVSW-5265 Remove boost from core ArmNN CMake
* Remove all but Boost_UNIT_TEST_FRAMEWORK_LIBRARY from ArmNN Cmake files. * Remove references to boost::fpc from old test applications. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: Ibb1261dee4b971d1788d2805528aa800a8b883ce
Diffstat (limited to 'tests/DeepSpeechV1InferenceTest.hpp')
-rw-r--r--tests/DeepSpeechV1InferenceTest.hpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/DeepSpeechV1InferenceTest.hpp b/tests/DeepSpeechV1InferenceTest.hpp
index ac799cb45a..9115a8f351 100644
--- a/tests/DeepSpeechV1InferenceTest.hpp
+++ b/tests/DeepSpeechV1InferenceTest.hpp
@@ -9,8 +9,7 @@
#include <armnn/utility/Assert.hpp>
#include <armnn/utility/IgnoreUnused.hpp>
-
-#include <boost/test/tools/floating_point_comparison.hpp>
+#include <armnnUtils/FloatingPointComparison.hpp>
#include <vector>
@@ -30,7 +29,6 @@ public:
testCaseData.m_InputData.m_StateH,
testCaseData.m_InputData.m_StateC},
{ k_OutputSize1, k_OutputSize2, k_OutputSize3 })
- , m_FloatComparer(boost::math::fpc::percent_tolerance(1.0f))
, m_ExpectedOutputs({testCaseData.m_ExpectedOutputData.m_InputSeq, testCaseData.m_ExpectedOutputData.m_StateH,
testCaseData.m_ExpectedOutputData.m_StateC})
{}
@@ -50,7 +48,7 @@ public:
// Check each output to see whether it is the expected value
for (unsigned int j = 0u; j < output1.size(); j++)
{
- if(!m_FloatComparer(output1[j], m_ExpectedOutputs.m_InputSeq[j]))
+ if(!armnnUtils::within_percentage_tolerance(output1[j], m_ExpectedOutputs.m_InputSeq[j]))
{
ARMNN_LOG(error) << "InputSeq for Lstm " << this->GetTestCaseId() <<
" is incorrect at" << j;
@@ -60,7 +58,7 @@ public:
for (unsigned int j = 0u; j < output2.size(); j++)
{
- if(!m_FloatComparer(output2[j], m_ExpectedOutputs.m_StateH[j]))
+ if(!armnnUtils::within_percentage_tolerance(output2[j], m_ExpectedOutputs.m_StateH[j]))
{
ARMNN_LOG(error) << "StateH for Lstm " << this->GetTestCaseId() <<
" is incorrect";
@@ -70,7 +68,7 @@ public:
for (unsigned int j = 0u; j < output3.size(); j++)
{
- if(!m_FloatComparer(output3[j], m_ExpectedOutputs.m_StateC[j]))
+ if(!armnnUtils::within_percentage_tolerance(output3[j], m_ExpectedOutputs.m_StateC[j]))
{
ARMNN_LOG(error) << "StateC for Lstm " << this->GetTestCaseId() <<
" is incorrect";
@@ -86,7 +84,6 @@ private:
static constexpr unsigned int k_OutputSize2 = 2048u;
static constexpr unsigned int k_OutputSize3 = 2048u;
- boost::math::fpc::close_at_tolerance<float> m_FloatComparer;
LstmInput m_ExpectedOutputs;
};