blob: 66135251e0f97f93ddbfc5ee00b6a0cb9393eff7 [file] [log] [blame]
telsoa014fcda012018-03-09 14:13:49 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// See LICENSE file in the project root for full license information.
4//
5
6#include <boost/test/unit_test.hpp>
7#include "armnnCaffeParser/ICaffeParser.hpp"
8#include "ParserPrototxtFixture.hpp"
9
10BOOST_AUTO_TEST_SUITE(CaffeParser)
11
telsoa01c577f2c2018-08-31 09:22:23 +010012struct DropoutFixture : public armnnUtils::ParserPrototxtFixture<armnnCaffeParser::ICaffeParser>
telsoa014fcda012018-03-09 14:13:49 +000013{
14 DropoutFixture()
15 {
16 m_Prototext = "name: \"DropoutFixture\"\n"
17 "layer {\n"
18 " name: \"data\"\n"
19 " type: \"Input\"\n"
20 " top: \"data\"\n"
21 " input_param { shape: { dim: 1 dim: 1 dim: 2 dim: 2 } }\n"
22 "}\n"
23 "layer {\n"
24 " bottom: \"data\"\n"
25 " top: \"drop1\"\n"
26 " name: \"drop1\"\n"
27 " type: \"Dropout\"\n"
28 "}\n"
29 "layer {\n"
30 " bottom: \"drop1\"\n"
31 " bottom: \"drop1\"\n"
32 " top: \"add\"\n"
33 " name: \"add\"\n"
34 " type: \"Eltwise\"\n"
35 "}\n";
36 SetupSingleInputSingleOutput("data", "add");
37 }
38};
39
40BOOST_FIXTURE_TEST_CASE(ParseDropout, DropoutFixture)
41{
42 RunTest<4>(
43 {
44 1, 2,
45 3, 4,
46 },
47 {
48 2, 4,
49 6, 8
50 });
51}
52
53BOOST_AUTO_TEST_SUITE_END()