6 #include <boost/test/unit_test.hpp> 18 explicit AddFixture(
const std::string & inputShape1,
19 const std::string & inputShape2,
20 const std::string & outputShape,
21 const std::string & dataType,
22 const std::string & activation=
"NONE")
31 layer_type: "InputLayer", 37 layerName: "InputLayer1", 41 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 46 dimensions: )" + inputShape1 + R"(, 47 dataType: )" + dataType + R"( 53 layer_type: "InputLayer", 59 layerName: "InputLayer2", 63 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 68 dimensions: )" + inputShape2 + R"(, 69 dataType: )" + dataType + R"( 75 layer_type: "AdditionLayer", 79 layerName: "AdditionLayer", 80 layerType: "Addition", 84 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 88 connection: {sourceLayerIndex:1, outputSlotIndex:0 }, 94 dimensions: )" + outputShape + R"(, 95 dataType: )" + dataType + R"( 101 layer_type: "OutputLayer", 107 layerName: "OutputLayer", 111 connection: {sourceLayerIndex:2, outputSlotIndex:0 }, 116 dimensions: )" + outputShape + R"(, 117 dataType: )" + dataType + R"( 129 struct SimpleAddFixture : AddFixture
131 SimpleAddFixture() : AddFixture(
"[ 2, 2 ]",
134 "QuantisedAsymm8") {}
137 struct SimpleAddFixture2 : AddFixture
139 SimpleAddFixture2() : AddFixture(
"[ 2, 2, 1, 1 ]",
147 RunTest<2, armnn::DataType::QAsymmU8>(
149 {{
"InputLayer1", { 0, 1, 2, 3 }},
150 {
"InputLayer2", { 4, 5, 6, 7 }}},
151 {{
"OutputLayer", { 4, 6, 8, 10 }}});
156 RunTest<4, armnn::DataType::Float32>(
158 {{
"InputLayer1", { 111, 85, 226, 3 }},
159 {
"InputLayer2", { 5, 8, 10, 12 }}},
160 {{
"OutputLayer", { 116, 93, 236, 15 }}});
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
void IgnoreUnused(Ts &&...)
BOOST_AUTO_TEST_SUITE_END()
BOOST_FIXTURE_TEST_CASE(AddQuantisedAsymm8, SimpleAddFixture)