ArmNN
 21.02
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)
 
 BOOST_FIXTURE_TEST_CASE (ValidConvWithDilationTest, Conv2DwithDilationFixture)
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/4]

BOOST_FIXTURE_TEST_CASE ( ValidConvTest  ,
SimpleConv2DFixture   
)

Definition at line 581 of file Conv2D.cpp.

582 {
583  RunTest<4>({{"Input", {1.0, 2.0, 3.0,
584  4.0, 5.0, 6.0,
585  7.0, 8.0, 9.0}}},
586  {{"Output", {1.0 * 2 + 2.0 * 1 + 3.0 * 0 +
587  4.0 * 6 + 5.0 * 2 + 6.0 * 1 +
588  7.0 * 4 + 8.0 * 1 + 9.0 * 2}}});
589 }

◆ BOOST_FIXTURE_TEST_CASE() [2/4]

BOOST_FIXTURE_TEST_CASE ( ValidConvWithBiasTest  ,
Conv2DWithBiasesFixture   
)

Definition at line 591 of file Conv2D.cpp.

592 {
593  RunTest<4>({{"Input", {1.0, 2.0,
594  3.0, 4.0}}},
595  {{"Output", {1.0 * 2 + 2.0 * 1 + 3.0 * 0 + 4 * 6 + 10,
596  2.0 * 2 + 0 * 1 + 4.0 * 0 + 0 * 6 + 10,
597  3.0 * 2 + 4.0 * 1 + 0 * 0 + 0 * 6 + 10,
598  4.0 * 2 + 0 * 1 + 0 * 0 + 0 * 6 + 10}}});
599 }

◆ BOOST_FIXTURE_TEST_CASE() [3/4]

BOOST_FIXTURE_TEST_CASE ( ValidConvDimReducTest  ,
Conv2DDimReducingFixture   
)

Definition at line 601 of file Conv2D.cpp.

602 {
603  RunTest<4>({{"Input", {1.0, 2.0, 3.0, 4.0, -1, -2, 3, 4, 1 , 1, 1, 1 }}},
604  {{"Output", {-1 * 1 + 2 * -1, -1 * 2 + 2 * -2,
605  -1 * 3 + 2 * 3, -1 * 4 + 2 * 4,
606  1, 2, 3, 4}}});
607 }

◆ BOOST_FIXTURE_TEST_CASE() [4/4]

BOOST_FIXTURE_TEST_CASE ( ValidConvWithDilationTest  ,
Conv2DwithDilationFixture   
)

Definition at line 609 of file Conv2D.cpp.

References BOOST_AUTO_TEST_SUITE_END().

610 {
611  RunTest<4>({{"Input", {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,
612  7.0, 8.0, 9.0, 10.0, 11.0, 12.0,
613  1.0, 2.0, 3.0, 4.0, 5.0, 6.0,
614  7.0, 8.0, 9.0, 10.0, 11.0, 12.0,
615  1.0, 2.0, 3.0, 4.0, 5.0, 6.0,
616  7.0, 8.0, 9.0, 10.0, 11.0, 12.0}}},
617  {{"Output", {39.0, 58.0, 153.0, 172.0 }}});
618 }