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 ResizeBilinearFixture : public ParserFlatbuffersSerializeFixture
16 explicit ResizeBilinearFixture(const std::string& inputShape,
17 const std::string& targetWidth,
18 const std::string& targetHeight,
19 const std::string& dataLayout,
20 const std::string& outputShape,
21 const std::string& dataType)
29 layer_type: "InputLayer",
35 layerName: "InputLayer",
39 connection: {sourceLayerIndex:0, outputSlotIndex:0 },
44 dimensions: )" + inputShape + R"(,
45 dataType: )" + dataType + R"(
53 layer_type: "ResizeBilinearLayer",
57 layerName: "ResizeBilinearLayer",
58 layerType: "ResizeBilinear",
61 connection: {sourceLayerIndex:0, outputSlotIndex:0 },
66 dimensions: )" + outputShape + R"(,
67 dataType: )" + dataType + R"(
72 targetWidth: )" + targetWidth + R"(,
73 targetHeight: )" + targetHeight + R"(,
74 dataLayout: )" + dataLayout + R"(,
79 layer_type: "OutputLayer",
85 layerName: "OutputLayer",
89 connection: {sourceLayerIndex:1, outputSlotIndex:0 },
94 dimensions: )" + outputShape + R"(,
95 dataType: )" + dataType + R"(
105 SetupSingleInputSingleOutput("InputLayer", "OutputLayer");
109 struct SimpleResizeBilinearFixture : ResizeBilinearFixture
111 SimpleResizeBilinearFixture() : ResizeBilinearFixture("[1, 2, 2, 2]",
119 BOOST_FIXTURE_TEST_CASE(SimpleResizeBilinearFloat32, SimpleResizeBilinearFixture)
121 RunTest<4, armnn::DataType::Float32>(0,
123 1.0f, 255.0f, 200.0f, 250.0f,
124 250.0f, 200.0f, 250.0f, 1.0f
131 BOOST_AUTO_TEST_SUITE_END()