ArmNN
 20.05
Activations.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "ParserFlatbuffersFixture.hpp"
#include "../TfLiteParser.hpp"

Go to the source code of this file.

Functions

 BOOST_FIXTURE_TEST_CASE (ParseReLu, ReLuFixture)
 
 BOOST_FIXTURE_TEST_CASE (ParseReLu6, ReLu6Fixture)
 
 BOOST_FIXTURE_TEST_CASE (ParseLogistic, SigmoidFixture)
 
 BOOST_FIXTURE_TEST_CASE (ParseTanH, TanHFixture)
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/4]

BOOST_FIXTURE_TEST_CASE ( ParseReLu  ,
ReLuFixture   
)

Definition at line 71 of file Activations.cpp.

72 {
73  RunTest<2, armnn::DataType::Float32>(0, { -1.0f, -0.5f, 1.25f, -3.0f, 0.0f, 0.5f, -0.75f },
74  { 0.0f, 0.0f, 1.25f, 0.0f, 0.0f, 0.5f, 0.0f });
75 }

◆ BOOST_FIXTURE_TEST_CASE() [2/4]

BOOST_FIXTURE_TEST_CASE ( ParseReLu6  ,
ReLu6Fixture   
)

Definition at line 81 of file Activations.cpp.

82 {
83  RunTest<2, armnn::DataType::Float32>(0, { -1.0f, -0.5f, 7.25f, -3.0f, 0.0f, 0.5f, -0.75f },
84  { 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.5f, 0.0f });
85 }

◆ BOOST_FIXTURE_TEST_CASE() [3/4]

BOOST_FIXTURE_TEST_CASE ( ParseLogistic  ,
SigmoidFixture   
)

Definition at line 91 of file Activations.cpp.

92 {
93  RunTest<2, armnn::DataType::Float32>(0, { -1.0f, -0.5f, 4.0f, -4.0f, 0.0f, 0.5f, -0.75f },
94  {0.268941f, 0.377541f, 0.982013f, 0.0179862f, 0.5f, 0.622459f, 0.320821f });
95 }

◆ BOOST_FIXTURE_TEST_CASE() [4/4]

BOOST_FIXTURE_TEST_CASE ( ParseTanH  ,
TanHFixture   
)

Definition at line 102 of file Activations.cpp.

References BOOST_AUTO_TEST_SUITE_END().

103 {
104  RunTest<2, armnn::DataType::Float32>(0,
105  { -0.1f, -0.2f, -0.3f, -0.4f, 0.1f, 0.2f, 0.3f },
106  { -0.09966799f, -0.19737528f, -0.29131261f, -0.379949f, 0.09966799f, 0.19737528f, 0.29131261f });
107 }