ArmNN
 20.02
Activations.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "armnnTfParser/ITfParser.hpp"
#include "ParserPrototxtFixture.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 (ParseSigmoid, SigmoidFixture)
 
 BOOST_FIXTURE_TEST_CASE (ParseSoftplus, SoftplusFixture)
 
 BOOST_FIXTURE_TEST_CASE (ParseTanh, TanhFixture)
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/5]

BOOST_FIXTURE_TEST_CASE ( ParseReLu  ,
ReLuFixture   
)

Definition at line 59 of file Activations.cpp.

60 {
61  RunTest<2>({ -1.0f, -0.5f, 1.25f, -3.0f, 0.0f, 0.5f, -0.75f },
62  { 0.0f, 0.0f, 1.25f, 0.0f, 0.0f, 0.5f, 0.0f });
63 }

◆ BOOST_FIXTURE_TEST_CASE() [2/5]

BOOST_FIXTURE_TEST_CASE ( ParseReLu6  ,
ReLu6Fixture   
)

Definition at line 70 of file Activations.cpp.

71 {
72  RunTest<2>({ -1.0f, -0.5f, 7.25f, -3.0f, 0.0f, 0.5f, -0.75f },
73  { 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.5f, 0.0f });
74 }

◆ BOOST_FIXTURE_TEST_CASE() [3/5]

BOOST_FIXTURE_TEST_CASE ( ParseSigmoid  ,
SigmoidFixture   
)

Definition at line 81 of file Activations.cpp.

82 {
83  RunTest<2>({ -0.1f, -0.2f, -0.3f, -0.4f, 0.1f, 0.2f, 0.3f },
84  { 0.4750208f, 0.45016602f, 0.42555749f, 0.40131235f, 0.52497917f, 0.54983395f, 0.57444251f });
85 }

◆ BOOST_FIXTURE_TEST_CASE() [4/5]

BOOST_FIXTURE_TEST_CASE ( ParseSoftplus  ,
SoftplusFixture   
)

Definition at line 92 of file Activations.cpp.

93 {
94  RunTest<2>({ -0.1f, -0.2f, -0.3f, -0.4f, 0.1f, 0.2f, 0.3f },
95  { 0.64439666f, 0.59813893f, 0.55435526f, 0.51301527f, 0.74439669f, 0.7981388f, 0.85435522f });
96 }

◆ BOOST_FIXTURE_TEST_CASE() [5/5]

BOOST_FIXTURE_TEST_CASE ( ParseTanh  ,
TanhFixture   
)

Definition at line 103 of file Activations.cpp.

References BOOST_AUTO_TEST_SUITE_END().

104 {
105  RunTest<2>({ -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 }