6 #include <boost/test/unit_test.hpp> 16 explicit ActivationFixture(
const std::string& inputShape,
17 const std::string& outputShape,
18 const std::string& dataType,
19 const std::string& activationType=
"Sigmoid",
20 const std::string& a =
"0.0",
21 const std::string& b =
"0.0")
28 layer_type: "InputLayer", 34 layerName: "InputLayer", 38 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 43 dimensions: )" + inputShape + R"(, 44 dataType: )" + dataType + R"( 52 layer_type: "ActivationLayer", 56 layerName: "ActivationLayer", 57 layerType: "Activation", 60 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 65 dimensions: )" + outputShape + R"(, 66 dataType: )" + dataType + R"( 73 activationFunction: )" + activationType + R"( 78 layer_type: "OutputLayer", 84 layerName: "OutputLayer", 88 connection: {sourceLayerIndex:1, outputSlotIndex:0 }, 93 dimensions: )" + outputShape + R"(, 94 dataType: )" + dataType + R"( 107 struct SimpleActivationFixture : ActivationFixture
109 SimpleActivationFixture() : ActivationFixture(
"[1, 2, 2, 1]",
115 struct SimpleActivationFixture2 : ActivationFixture
117 SimpleActivationFixture2() : ActivationFixture(
"[1, 2, 2, 1]",
123 struct SimpleActivationFixture3 : ActivationFixture
125 SimpleActivationFixture3() : ActivationFixture(
"[1, 2, 2, 1]",
133 struct SimpleActivationFixture4 : ActivationFixture
135 SimpleActivationFixture4() : ActivationFixture(
"[1, 2, 2, 1]",
146 RunTest<4, armnn::DataType::QAsymmU8>(
148 {{
"InputLayer", {10, 0, 2, 0}}},
149 {{
"OutputLayer", {10, 0, 2, 0}}});
154 RunTest<4, armnn::DataType::Float32>(
156 {{
"InputLayer", {111, -85, 226, 3}}},
157 {{
"OutputLayer", {111, 0, 226, 3}}});
163 RunTest<4, armnn::DataType::QAsymmU8>(
165 {{
"InputLayer", {10, 0, 2, 0}}},
166 {{
"OutputLayer", {5, 0, 2, 0}}});
171 RunTest<4, armnn::DataType::Float32>(
173 {{
"InputLayer", {111, -85, 226, 3}}},
174 {{
"OutputLayer", {5, 0, 5, 3}}});
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_FIXTURE_TEST_CASE(ActivationReluQuantisedAsymm8, SimpleActivationFixture)
BOOST_AUTO_TEST_SUITE_END()