7 #include "../Deserializer.hpp" 11 #include <boost/test/unit_test.hpp> 17 explicit InstanceNormalizationFixture(
const std::string &inputShape,
18 const std::string &outputShape,
19 const std::string &gamma,
20 const std::string &beta,
21 const std::string &epsilon,
22 const std::string &dataType,
23 const std::string &dataLayout)
31 layer_type: "InputLayer", 37 layerName: "InputLayer", 41 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 46 dimensions: )" + inputShape + R"(, 47 dataType: ")" + dataType + R"(", 48 quantizationScale: 0.5, 57 layer_type: "InstanceNormalizationLayer", 61 layerName: "InstanceNormalizationLayer", 62 layerType: "InstanceNormalization", 65 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 70 dimensions: )" + outputShape + R"(, 71 dataType: ")" + dataType + R"(" 76 dataLayout: ")" + dataLayout + R"(", 77 gamma: ")" + gamma + R"(", 78 beta: ")" + beta + R"(", 79 eps: )" + epsilon + R"( 84 layer_type: "OutputLayer", 90 layerName: "OutputLayer", 94 connection: {sourceLayerIndex:1, outputSlotIndex:0 }, 99 dimensions: )" + outputShape + R"(, 100 dataType: ")" + dataType + R"(" 112 struct InstanceNormalizationFloat32Fixture : InstanceNormalizationFixture
114 InstanceNormalizationFloat32Fixture():InstanceNormalizationFixture(
"[ 2, 2, 2, 2 ]",
125 RunTest<4, armnn::DataType::Float32>(
141 0.0000000f, -1.1470304f,
142 0.0000000f, -0.2294061f,
144 0.0000000f, -0.2294061f,
145 0.0000000f, 1.6058424f,
147 0.9999501f, -0.7337929f,
148 -0.9999501f, 0.5241377f,
150 -0.9999501f, -1.1531031f,
151 0.9999501f, 1.3627582f
void SetupSingleInputSingleOutput(const std::string &inputName, const std::string &outputName)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_FIXTURE_TEST_CASE(InstanceNormalizationFloat32, InstanceNormalizationFloat32Fixture)