2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
6 #include <boost/test/unit_test.hpp>
7 #include "ParserFlatbuffersSerializeFixture.hpp"
8 #include <armnnDeserializer/IDeserializer.hpp>
12 BOOST_AUTO_TEST_SUITE(Deserializer)
14 struct RsqrtFixture : public ParserFlatbuffersSerializeFixture
16 explicit RsqrtFixture(const std::string & inputShape,
17 const std::string & outputShape,
18 const std::string & dataType)
26 layer_type: "InputLayer",
32 layerName: "InputLayer",
36 connection: {sourceLayerIndex:0, outputSlotIndex:0 },
41 dimensions: )" + inputShape + R"(,
42 dataType: )" + dataType + R"(
48 layer_type: "RsqrtLayer",
52 layerName: "RsqrtLayer",
57 connection: {sourceLayerIndex:0, outputSlotIndex:0 },
63 dimensions: )" + outputShape + R"(,
64 dataType: )" + dataType + R"(
70 layer_type: "OutputLayer",
76 layerName: "OutputLayer",
80 connection: {sourceLayerIndex:1, outputSlotIndex:0 },
85 dimensions: )" + outputShape + R"(,
86 dataType: )" + dataType + R"(
98 struct Rsqrt2dFixture : RsqrtFixture
100 Rsqrt2dFixture() : RsqrtFixture("[ 2, 2 ]",
105 BOOST_FIXTURE_TEST_CASE(Rsqrt2d, Rsqrt2dFixture)
107 RunTest<2, armnn::DataType::Float32>(
109 {{"InputLayer", { 1.0f, 4.0f,
111 {{"OutputLayer",{ 1.0f, 0.5f,
116 BOOST_AUTO_TEST_SUITE_END()