6 #include <boost/test/unit_test.hpp> 8 #include "../Deserializer.hpp" 10 #include <boost/core/ignore_unused.hpp> 19 explicit MultiplicationFixture(
const std::string & inputShape1,
20 const std::string & inputShape2,
21 const std::string & outputShape,
22 const std::string & dataType,
23 const std::string & activation=
"NONE")
25 boost::ignore_unused(activation);
32 layer_type: "InputLayer", 38 layerName: "InputLayer1", 42 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 47 dimensions: )" + inputShape1 + R"(, 48 dataType: )" + dataType + R"( 54 layer_type: "InputLayer", 60 layerName: "InputLayer2", 64 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 69 dimensions: )" + inputShape2 + R"(, 70 dataType: )" + dataType + R"( 76 layer_type: "MultiplicationLayer", 80 layerName: "MultiplicationLayer", 81 layerType: "Multiplication", 85 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 89 connection: {sourceLayerIndex:1, outputSlotIndex:0 }, 95 dimensions: )" + outputShape + R"(, 96 dataType: )" + dataType + R"( 102 layer_type: "OutputLayer", 108 layerName: "OutputLayer", 112 connection: {sourceLayerIndex:2, outputSlotIndex:0 }, 117 dimensions: )" + outputShape + R"(, 118 dataType: )" + dataType + R"( 130 struct SimpleMultiplicationFixture : MultiplicationFixture
132 SimpleMultiplicationFixture() : MultiplicationFixture(
"[ 2, 2 ]",
135 "QuantisedAsymm8") {}
138 struct SimpleMultiplicationFixture2 : MultiplicationFixture
140 SimpleMultiplicationFixture2() : MultiplicationFixture(
"[ 2, 2, 1, 1 ]",
148 RunTest<2, armnn::DataType::QAsymmU8>(
150 {{
"InputLayer1", { 0, 1, 2, 3 }},
151 {
"InputLayer2", { 4, 5, 6, 7 }}},
152 {{
"OutputLayer", { 0, 5, 12, 21 }}});
157 RunTest<4, armnn::DataType::Float32>(
159 {{
"InputLayer1", { 100, 40, 226, 9 }},
160 {
"InputLayer2", { 5, 8, 1, 12 }}},
161 {{
"OutputLayer", { 500, 320, 226, 108 }}});
BOOST_FIXTURE_TEST_CASE(MultiplicationQuantisedAsymm8, SimpleMultiplicationFixture)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)