6 #include <boost/test/unit_test.hpp> 16 explicit DivisionFixture(
const std::string & inputShape1,
17 const std::string & inputShape2,
18 const std::string & outputShape,
19 const std::string & dataType)
27 layer_type: "InputLayer", 33 layerName: "InputLayer1", 37 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 42 dimensions: )" + inputShape1 + R"(, 43 dataType: )" + dataType + R"( 49 layer_type: "InputLayer", 55 layerName: "InputLayer2", 59 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 64 dimensions: )" + inputShape2 + R"(, 65 dataType: )" + dataType + R"( 71 layer_type: "DivisionLayer", 75 layerName: "DivisionLayer", 76 layerType: "Division", 80 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 84 connection: {sourceLayerIndex:1, outputSlotIndex:0 }, 90 dimensions: )" + outputShape + R"(, 91 dataType: )" + dataType + R"( 97 layer_type: "OutputLayer", 103 layerName: "OutputLayer", 107 connection: {sourceLayerIndex:2, outputSlotIndex:0 }, 112 dimensions: )" + outputShape + R"(, 113 dataType: )" + dataType + R"( 125 struct SimpleDivisionFixture : DivisionFixture
127 SimpleDivisionFixture() : DivisionFixture(
"[ 2, 2 ]",
130 "QuantisedAsymm8") {}
133 struct SimpleDivisionFixture2 : DivisionFixture
135 SimpleDivisionFixture2() : DivisionFixture(
"[ 2, 2, 1, 1 ]",
143 RunTest<2, armnn::DataType::QAsymmU8>(
145 {{
"InputLayer1", { 0, 5, 24, 21 }},
146 {
"InputLayer2", { 4, 1, 6, 7 }}},
147 {{
"OutputLayer", { 0, 5, 3, 3 }}});
152 RunTest<4, armnn::DataType::Float32>(
154 {{
"InputLayer1", { 100, 40, 226, 9 }},
155 {
"InputLayer2", { 5, 8, 1, 3 }}},
156 {{
"OutputLayer", { 20, 5, 226, 3 }}});
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_FIXTURE_TEST_CASE(DivisionQuantisedAsymm8, SimpleDivisionFixture)
BOOST_AUTO_TEST_SUITE_END()