6 #include <boost/test/unit_test.hpp> 8 #include "../Deserializer.hpp" 17 explicit ActivationFixture(
const std::string& inputShape,
18 const std::string& outputShape,
19 const std::string& dataType,
20 const std::string& activationType=
"Sigmoid",
21 const std::string& a =
"0.0",
22 const std::string& b =
"0.0")
29 layer_type: "InputLayer", 35 layerName: "InputLayer", 39 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 44 dimensions: )" + inputShape + R"(, 45 dataType: )" + dataType + R"( 53 layer_type: "ActivationLayer", 57 layerName: "ActivationLayer", 58 layerType: "Activation", 61 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 66 dimensions: )" + outputShape + R"(, 67 dataType: )" + dataType + R"( 74 activationFunction: )" + activationType + R"( 79 layer_type: "OutputLayer", 85 layerName: "OutputLayer", 89 connection: {sourceLayerIndex:1, outputSlotIndex:0 }, 94 dimensions: )" + outputShape + R"(, 95 dataType: )" + dataType + R"( 108 struct SimpleActivationFixture : ActivationFixture
110 SimpleActivationFixture() : ActivationFixture(
"[1, 2, 2, 1]",
116 struct SimpleActivationFixture2 : ActivationFixture
118 SimpleActivationFixture2() : ActivationFixture(
"[1, 2, 2, 1]",
124 struct SimpleActivationFixture3 : ActivationFixture
126 SimpleActivationFixture3() : ActivationFixture(
"[1, 2, 2, 1]",
134 struct SimpleActivationFixture4 : ActivationFixture
136 SimpleActivationFixture4() : ActivationFixture(
"[1, 2, 2, 1]",
147 RunTest<4, armnn::DataType::QAsymmU8>(
149 {{
"InputLayer", {10, 0, 2, 0}}},
150 {{
"OutputLayer", {10, 0, 2, 0}}});
155 RunTest<4, armnn::DataType::Float32>(
157 {{
"InputLayer", {111, -85, 226, 3}}},
158 {{
"OutputLayer", {111, 0, 226, 3}}});
164 RunTest<4, armnn::DataType::QAsymmU8>(
166 {{
"InputLayer", {10, 0, 2, 0}}},
167 {{
"OutputLayer", {5, 0, 2, 0}}});
172 RunTest<4, armnn::DataType::Float32>(
174 {{
"InputLayer", {111, -85, 226, 3}}},
175 {{
"OutputLayer", {5, 0, 5, 3}}});
BOOST_FIXTURE_TEST_CASE(ActivationReluQuantisedAsymm8, SimpleActivationFixture)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)