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 "../Deserializer.hpp"
13 BOOST_AUTO_TEST_SUITE(Deserializer)
15 struct RsqrtFixture : public ParserFlatbuffersSerializeFixture
17 explicit RsqrtFixture(const std::string & inputShape,
18 const std::string & outputShape,
19 const std::string & dataType)
27 layer_type: "InputLayer",
33 layerName: "InputLayer",
37 connection: {sourceLayerIndex:0, outputSlotIndex:0 },
42 dimensions: )" + inputShape + R"(,
43 dataType: )" + dataType + R"(
49 layer_type: "RsqrtLayer",
53 layerName: "RsqrtLayer",
58 connection: {sourceLayerIndex:0, outputSlotIndex:0 },
64 dimensions: )" + outputShape + R"(,
65 dataType: )" + dataType + R"(
71 layer_type: "OutputLayer",
77 layerName: "OutputLayer",
81 connection: {sourceLayerIndex:1, outputSlotIndex:0 },
86 dimensions: )" + outputShape + R"(,
87 dataType: )" + dataType + R"(
99 struct Rsqrt2dFixture : RsqrtFixture
101 Rsqrt2dFixture() : RsqrtFixture("[ 2, 2 ]",
106 BOOST_FIXTURE_TEST_CASE(Rsqrt2d, Rsqrt2dFixture)
108 RunTest<2, armnn::DataType::Float32>(
110 {{"InputLayer", { 1.0f, 4.0f,
112 {{"OutputLayer",{ 1.0f, 0.5f,
117 BOOST_AUTO_TEST_SUITE_END()