2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // See LICENSE file in the project root for full license information.
6 #include <boost/test/unit_test.hpp>
7 #include "armnnTfParser/ITfParser.hpp"
8 #include "ParserPrototxtFixture.hpp"
10 BOOST_AUTO_TEST_SUITE(TensorflowParser)
12 struct ShapeFixture : public armnnUtils::ParserPrototxtFixture<armnnTfParser::ITfParser>
18 " name: \"Placeholder\" \n"
19 " op: \"Placeholder\" \n"
47 " name: \"shapeTest\" \n"
49 " input: \"Placeholder\" \n"
57 " key: \"out_type\" \n"
64 " name: \"Reshape\" \n"
66 " input: \"Placeholder\" \n"
67 " input: \"shapeTest\" \n"
82 SetupSingleInputSingleOutput({1, 4}, "Placeholder", "Reshape");
86 BOOST_FIXTURE_TEST_CASE(ParseShape, ShapeFixture)
88 // Note: the test's output cannot be an int32 const layer, because ARMNN only supports u8 and float layers.
89 // For that reason I added a reshape layer which reshapes the input to its original dimensions.
90 RunTest<2>({ 0.0f, 1.0f, 2.0f, 3.0f }, { 0.0f, 1.0f, 2.0f, 3.0f });
93 BOOST_AUTO_TEST_SUITE_END()