ArmNN
 21.02
BatchToSpaceND.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "ParserFlatbuffersFixture.hpp"
#include "../TfLiteParser.hpp"
#include <string>
#include <iostream>

Go to the source code of this file.

Functions

 BOOST_FIXTURE_TEST_CASE (BatchToSpaceNDTest1, BatchToSpaceNDFixtureTest1)
 
 BOOST_FIXTURE_TEST_CASE (ParseBatchToSpaceNDTest2, BatchToSpaceNDFixtureTest2)
 
 BOOST_FIXTURE_TEST_CASE (ParseBatchToSpaceNDTest3, BatchToSpaceNDFixtureTest3)
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/3]

BOOST_FIXTURE_TEST_CASE ( BatchToSpaceNDTest1  ,
BatchToSpaceNDFixtureTest1   
)

Definition at line 108 of file BatchToSpaceND.cpp.

109 {
110  RunTest<4, armnn::DataType::Float32>
111  (0,
112  {{ "inputTensor", { // Batch 0, Height 0, Width (2) x Channel (1)
113  1.0f, 3.0f,
114  // Batch 0, Height 1, Width (2) x Channel (1)
115  9.0f, 11.0f,
116 
117  // Batch 1, Height 0, Width (2) x Channel (1)
118  2.0f, 4.0f,
119  // Batch 1, Height 1, Width (2) x Channel (1)
120  10.0f, 12.0f,
121 
122  // Batch 2, Height 0, Width (2) x Channel (1)
123  5.0f, 7.0f,
124  // Batch 2, Height 1, Width (2) x Channel (1)
125  13.0f, 15.0f,
126 
127  // Batch 3, Height 0, Width (2) x Channel (3)
128  6.0f, 8.0f,
129  // Batch 3, Height 1, Width (2) x Channel (1)
130  14.0f, 16.0f }}},
131  {{ "outputTensor", { 1.0f, 2.0f, 3.0f, 4.0f,
132  5.0f, 6.0f, 7.0f, 8.0f,
133  9.0f, 10.0f, 11.0f, 12.0f,
134  13.0f, 14.0f, 15.0f, 16.0f }}});
135 }

◆ BOOST_FIXTURE_TEST_CASE() [2/3]

BOOST_FIXTURE_TEST_CASE ( ParseBatchToSpaceNDTest2  ,
BatchToSpaceNDFixtureTest2   
)

Definition at line 145 of file BatchToSpaceND.cpp.

146 {
147  RunTest<4, armnn::DataType::Float32>
148  (0,
149  {{ "inputTensor", { 1.0f, 2.0f, 3.0f, 4.0f }}},
150  {{ "outputTensor", { // Batch 0, Height 0, Width (2) x Channel (1)
151  1.0f, 2.0f, 3.0f, 4.0f }}});
152 }

◆ BOOST_FIXTURE_TEST_CASE() [3/3]

BOOST_FIXTURE_TEST_CASE ( ParseBatchToSpaceNDTest3  ,
BatchToSpaceNDFixtureTest3   
)

Definition at line 162 of file BatchToSpaceND.cpp.

References BOOST_AUTO_TEST_SUITE_END().

163 {
164  RunTest<4, armnn::DataType::Float32>
165  (0,
166  {{ "inputTensor", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f }}},
167  {{ "outputTensor", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f }}});
168 }