7 #include "../Deserializer.hpp" 11 #include <boost/test/unit_test.hpp> 20 explicit MultiplicationFixture(
const std::string & inputShape1,
21 const std::string & inputShape2,
22 const std::string & outputShape,
23 const std::string & dataType,
24 const std::string & activation=
"NONE")
33 layer_type: "InputLayer", 39 layerName: "InputLayer1", 43 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 48 dimensions: )" + inputShape1 + R"(, 49 dataType: )" + dataType + R"( 55 layer_type: "InputLayer", 61 layerName: "InputLayer2", 65 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 70 dimensions: )" + inputShape2 + R"(, 71 dataType: )" + dataType + R"( 77 layer_type: "MultiplicationLayer", 81 layerName: "MultiplicationLayer", 82 layerType: "Multiplication", 86 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 90 connection: {sourceLayerIndex:1, outputSlotIndex:0 }, 96 dimensions: )" + outputShape + R"(, 97 dataType: )" + dataType + R"( 103 layer_type: "OutputLayer", 109 layerName: "OutputLayer", 113 connection: {sourceLayerIndex:2, outputSlotIndex:0 }, 118 dimensions: )" + outputShape + R"(, 119 dataType: )" + dataType + R"( 131 struct SimpleMultiplicationFixture : MultiplicationFixture
133 SimpleMultiplicationFixture() : MultiplicationFixture(
"[ 2, 2 ]",
136 "QuantisedAsymm8") {}
139 struct SimpleMultiplicationFixture2 : MultiplicationFixture
141 SimpleMultiplicationFixture2() : MultiplicationFixture(
"[ 2, 2, 1, 1 ]",
149 RunTest<2, armnn::DataType::QAsymmU8>(
151 {{
"InputLayer1", { 0, 1, 2, 3 }},
152 {
"InputLayer2", { 4, 5, 6, 7 }}},
153 {{
"OutputLayer", { 0, 5, 12, 21 }}});
158 RunTest<4, armnn::DataType::Float32>(
160 {{
"InputLayer1", { 100, 40, 226, 9 }},
161 {
"InputLayer2", { 5, 8, 1, 12 }}},
162 {{
"OutputLayer", { 500, 320, 226, 108 }}});
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
void IgnoreUnused(Ts &&...)
BOOST_FIXTURE_TEST_CASE(MultiplicationQuantisedAsymm8, SimpleMultiplicationFixture)
BOOST_AUTO_TEST_SUITE_END()