ArmNN
 20.05
Conv2D.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "armnnOnnxParser/IOnnxParser.hpp"
#include "ParserPrototxtFixture.hpp"

Go to the source code of this file.

Functions

 BOOST_FIXTURE_TEST_CASE (ValidConvTest, SimpleConv2DFixture)
 
 BOOST_FIXTURE_TEST_CASE (ValidConvWithBiasTest, Conv2DWithBiasesFixture)
 
 BOOST_FIXTURE_TEST_CASE (ValidConvDimReducTest, Conv2DDimReducingFixture)
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/3]

BOOST_FIXTURE_TEST_CASE ( ValidConvTest  ,
SimpleConv2DFixture   
)

Definition at line 441 of file Conv2D.cpp.

442 {
443  RunTest<4>({{"Input", {1.0, 2.0, 3.0,
444  4.0, 5.0, 6.0,
445  7.0, 8.0, 9.0}}},
446  {{"Output", {1.0 * 2 + 2.0 * 1 + 3.0 * 0 +
447  4.0 * 6 + 5.0 * 2 + 6.0 * 1 +
448  7.0 * 4 + 8.0 * 1 + 9.0 * 2}}});
449 }

◆ BOOST_FIXTURE_TEST_CASE() [2/3]

BOOST_FIXTURE_TEST_CASE ( ValidConvWithBiasTest  ,
Conv2DWithBiasesFixture   
)

Definition at line 451 of file Conv2D.cpp.

452 {
453  RunTest<4>({{"Input", {1.0, 2.0,
454  3.0, 4.0}}},
455  {{"Output", {1.0 * 2 + 2.0 * 1 + 3.0 * 0 + 4 * 6 + 10,
456  2.0 * 2 + 0 * 1 + 4.0 * 0 + 0 * 6 + 10,
457  3.0 * 2 + 4.0 * 1 + 0 * 0 + 0 * 6 + 10,
458  4.0 * 2 + 0 * 1 + 0 * 0 + 0 * 6 + 10}}});
459 }

◆ BOOST_FIXTURE_TEST_CASE() [3/3]

BOOST_FIXTURE_TEST_CASE ( ValidConvDimReducTest  ,
Conv2DDimReducingFixture   
)

Definition at line 461 of file Conv2D.cpp.

References BOOST_AUTO_TEST_SUITE_END().

462 {
463  RunTest<4>({{"Input", {1.0, 2.0, 3.0, 4.0, -1, -2, 3, 4, 1 , 1, 1, 1 }}},
464  {{"Output", {-1 * 1 + 2 * -1, -1 * 2 + 2 * -2,
465  -1 * 3 + 2 * 3, -1 * 4 + 2 * 4,
466  1, 2, 3, 4}}});
467 }