#include <boost/test/unit_test.hpp>
#include "ParserFlatbuffersFixture.hpp"
#include "../TfLiteParser.hpp"
#include <sstream>
Go to the source code of this file.
◆ BOOST_FIXTURE_TEST_CASE() [1/6]
BOOST_FIXTURE_TEST_CASE |
( |
ParseSimpleConv2D |
, |
|
|
SimpleConv2DFixture |
|
|
) |
| |
Definition at line 90 of file Conv2D.cpp.
92 RunTest<4, armnn::DataType::QAsymmU8>(
◆ BOOST_FIXTURE_TEST_CASE() [2/6]
BOOST_FIXTURE_TEST_CASE |
( |
ParseConv2DWithBias |
, |
|
|
SimpleConv2DWithBiasesFixture |
|
|
) |
| |
Definition at line 220 of file Conv2D.cpp.
222 RunTest<4, armnn::DataType::QAsymmU8>(
230 (1*2 + 2*1 + 3*0 + 4*6 + 10)/2,
231 (2*2 + 0*1 + 4*0 + 0*6 + 10)/2,
232 (3*2 + 4*1 + 0*0 + 0*6 + 10)/2,
233 (4*2 + 0*1 + 0*0 + 0*6 + 10)/2
◆ BOOST_FIXTURE_TEST_CASE() [3/6]
BOOST_FIXTURE_TEST_CASE |
( |
ParseDynamicConv2DWithBias |
, |
|
|
DynamicConv2DWithBiasesFixture |
|
|
) |
| |
Definition at line 250 of file Conv2D.cpp.
References armnn::QAsymmU8.
254 armnn::DataType::QAsymmU8>(0,
255 { {
"inputTensor", { 1, 2, 3, 4, } } },
256 { {
"outputTensor", { (1*2 + 2*1 + 3*0 + 4*6 + 10)/2,
257 (2*2 + 0*1 + 4*0 + 0*6 + 10)/2,
258 (3*2 + 4*1 + 0*0 + 0*6 + 10)/2,
259 (4*2 + 0*1 + 0*0 + 0*6 + 10)/2} } },
◆ BOOST_FIXTURE_TEST_CASE() [4/6]
BOOST_FIXTURE_TEST_CASE |
( |
ParseConv2D_112x112_out |
, |
|
|
Conv2DShapeTestFixture |
|
|
) |
| |
◆ BOOST_FIXTURE_TEST_CASE() [5/6]
BOOST_FIXTURE_TEST_CASE |
( |
ParseConv2DAndReluWithBias |
, |
|
|
ReluConv2DWithBiasesFixture |
|
|
) |
| |
Definition at line 313 of file Conv2D.cpp.
316 uint8_t outZero = 20;
319 RunTest<4, armnn::DataType::QAsymmU8>(
331 std::max(outZero, static_cast<uint8_t>((1*(2-fz) + 2*(1-fz) + 4*(0-fz) + 8*(6-fz) + bias)/2 + outZero)),
332 std::max(outZero, static_cast<uint8_t>((2*(2-fz) + 0*(1-fz) + 8*(0-fz) + 0*(6-fz) + bias)/2 + outZero)),
333 std::max(outZero, static_cast<uint8_t>((4*(2-fz) + 8*(1-fz) + 0*(0-fz) + 0*(6-fz) + bias)/2 + outZero)),
334 std::max(outZero, static_cast<uint8_t>((8*(2-fz) + 0*(1-fz) + 0*(0-fz) + 0*(6-fz) + bias)/2 + outZero))
◆ BOOST_FIXTURE_TEST_CASE() [6/6]
BOOST_FIXTURE_TEST_CASE |
( |
ParseConv2DAndRelu6WithBias |
, |
|
|
Relu6Conv2DWithBiasesFixture |
|
|
) |
| |
Definition at line 356 of file Conv2D.cpp.
References BOOST_AUTO_TEST_SUITE_END().
358 uint8_t relu6Min = 6 / 2;
360 RunTest<4, armnn::DataType::QAsymmU8>(
370 std::min(relu6Min, static_cast<uint8_t>((1*2 + 2*1 + 4*0 + 1*6)/2)),
371 std::min(relu6Min, static_cast<uint8_t>((2*2 + 0*1 + 1*0 + 0*6)/2)),
372 std::min(relu6Min, static_cast<uint8_t>((4*2 + 1*1 + 0*0 + 0*6)/2)),
373 std::min(relu6Min, static_cast<uint8_t>((1*2 + 0*1 + 0*0 + 0*6)/2))