ArmNN
 21.02
LoadScopeDynamicTensor.cpp File Reference
#include "armnnTfLiteParser/ITfLiteParser.hpp"
#include "ParserFlatbuffersFixture.hpp"
#include <string>
#include <boost/test/unit_test.hpp>

Go to the source code of this file.

Functions

 BOOST_FIXTURE_TEST_CASE (LoadScopeDynamicTensor0, LoadScopeDynamicTensor0Fixture)
 
 BOOST_FIXTURE_TEST_CASE (LoadScopeDynamicTensor1, LoadScopeDynamicTensor1Fixture)
 
 BOOST_FIXTURE_TEST_CASE (LoadScopeDynamicTensor2, LoadScopeDynamicTensor2Fixture)
 
 BOOST_FIXTURE_TEST_CASE (LoadScopeDynamicTensorBroadcasting3D, LoadScopeDynamicTensorBroadcasting3DFixture)
 
 BOOST_FIXTURE_TEST_CASE (LoadScopeDynamicTensorBroadcasting2D, LoadScopeDynamicTensorBroadcasting2DFixture)
 
 BOOST_FIXTURE_TEST_CASE (LoadScopeDynamicTensorBroadcasting1D, LoadScopeDynamicTensorBroadcasting1DFixture)
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/6]

BOOST_FIXTURE_TEST_CASE ( LoadScopeDynamicTensor0  ,
LoadScopeDynamicTensor0Fixture   
)

Definition at line 147 of file LoadScopeDynamicTensor.cpp.

148 {
149  RunTest<4, armnn::DataType::Float32, armnn::DataType::Float32>(
150  0,
151  { {"input0", { 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f, 11.f }} },
152  { {"output", { 0.26894143f, 0.7310586f }} },
153  true);
154 }

◆ BOOST_FIXTURE_TEST_CASE() [2/6]

BOOST_FIXTURE_TEST_CASE ( LoadScopeDynamicTensor1  ,
LoadScopeDynamicTensor1Fixture   
)

Definition at line 156 of file LoadScopeDynamicTensor.cpp.

157 {
158  RunTest<4, armnn::DataType::Float32, armnn::DataType::Float32>(
159  0,
160  { {"input0", { 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f }} },
161  { {"output", { 1.f, 1.f }} },
162  true);
163 }

◆ BOOST_FIXTURE_TEST_CASE() [3/6]

BOOST_FIXTURE_TEST_CASE ( LoadScopeDynamicTensor2  ,
LoadScopeDynamicTensor2Fixture   
)

Definition at line 165 of file LoadScopeDynamicTensor.cpp.

166 {
167  RunTest<4, armnn::DataType::Float32, armnn::DataType::Float32>(
168  0,
169  { {"input0", { 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f }} },
170  { {"output", { 0.7772999f, 0.22270015f }} },
171  true);
172 }

◆ BOOST_FIXTURE_TEST_CASE() [4/6]

BOOST_FIXTURE_TEST_CASE ( LoadScopeDynamicTensorBroadcasting3D  ,
LoadScopeDynamicTensorBroadcasting3DFixture   
)

Definition at line 343 of file LoadScopeDynamicTensor.cpp.

344 {
345  RunTest<4, armnn::DataType::Float32, armnn::DataType::Float32>(
346  0,
347  { {"input0", { 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f, 11.f }},
348  {"input1", { 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f, 11.f, 12.f, 13.f, 14.f }},
349  {"input2", { 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f, 11.f, 12.f }}
350  },
351  { {"output", { 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f, 11.f, 12.f, 13.f }} },
352  true);
353 }

◆ BOOST_FIXTURE_TEST_CASE() [5/6]

BOOST_FIXTURE_TEST_CASE ( LoadScopeDynamicTensorBroadcasting2D  ,
LoadScopeDynamicTensorBroadcasting2DFixture   
)

Definition at line 355 of file LoadScopeDynamicTensor.cpp.

356 {
357  RunTest<4, armnn::DataType::Float32, armnn::DataType::Float32>(
358  0,
359  { {"input0", { 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f, 11.f }},
360  {"input1", { 3.f, 4.f, 5.f, 6.f, 7.f, 8.f }},
361  {"input2", { -1.f, -2.f, 3.f, 4.f, 5.f, 6.f }}
362  },
363  { {"output", { 4.f, 7.f, 4.f, 5.f, 6.f, 7.f, 10.f, 13.f, 10.f, 11.f, 12.f, 13.f }} },
364  true);
365 }

◆ BOOST_FIXTURE_TEST_CASE() [6/6]

BOOST_FIXTURE_TEST_CASE ( LoadScopeDynamicTensorBroadcasting1D  ,
LoadScopeDynamicTensorBroadcasting1DFixture   
)

Definition at line 367 of file LoadScopeDynamicTensor.cpp.

References BOOST_AUTO_TEST_SUITE_END().

368 {
369  RunTest<4, armnn::DataType::Float32, armnn::DataType::Float32>(
370  0,
371  { {"input0", { 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f, 11.f }},
372  {"input1", { 5.f }},
373  {"input2", { 1.f }}
374  },
375  { {"output", { 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f, 11.f, 12.f, 13.f, 14.f, 15.f }} },
376  true);
377 }