1 /*
2  * Copyright (c) 2017 Arm Limited.
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #ifndef ARM_COMPUTE_TEST_GOOGLENETINCEPTIONV1_ACTIVATION_LAYER_DATASET
25 #define ARM_COMPUTE_TEST_GOOGLENETINCEPTIONV1_ACTIVATION_LAYER_DATASET
26 
27 #include "tests/framework/datasets/Datasets.h"
28 
29 #include "utils/TypePrinter.h"
30 
31 #include "arm_compute/core/TensorShape.h"
32 #include "arm_compute/core/Types.h"
33 
34 namespace arm_compute
35 {
36 namespace test
37 {
38 namespace datasets
39 {
40 class GoogLeNetInceptionV1ActivationLayerDataset final : public
41     framework::dataset::CartesianProductDataset<framework::dataset::InitializerListDataset<TensorShape>, framework::dataset::SingletonDataset<ActivationLayerInfo>>
42 {
43 public:
GoogLeNetInceptionV1ActivationLayerDataset()44     GoogLeNetInceptionV1ActivationLayerDataset()
45         : CartesianProductDataset
46     {
47         framework::dataset::make("Shape", { // conv1/relu_7x7
48             TensorShape(112U, 112U, 64U),
49             // conv2/relu_3x3_reduce
50             TensorShape(56U, 56U, 64U),
51             // conv2/relu_3x3
52             TensorShape(56U, 56U, 192U),
53             // inception_3a/relu_1x1, inception_3b/relu_pool_proj
54             TensorShape(28U, 28U, 64U),
55             // inception_3a/relu_3x3_reduce, inception_3b/relu_5x5
56             TensorShape(28U, 28U, 96U),
57             // inception_3a/relu_3x3, inception_3b/relu_1x1, inception_3b/relu_3x3_reduce
58             TensorShape(28U, 28U, 128U),
59             // inception_3a/relu_5x5_reduce
60             TensorShape(28U, 28U, 16U),
61             // inception_3a/relu_5x5, inception_3a/relu_pool_proj, inception_3b/relu_5x5_reduce
62             TensorShape(28U, 28U, 32U),
63             // inception_3b/relu_3x3
64             TensorShape(28U, 28U, 192U),
65             // inception_4a/relu_1x1
66             TensorShape(14U, 14U, 192U),
67             // inception_4a/relu_3x3_reduce
68             TensorShape(14U, 14U, 96U),
69             // inception_4a/relu_3x3
70             TensorShape(14U, 14U, 208U),
71             // inception_4a/relu_5x5_reduce
72             TensorShape(14U, 14U, 16U),
73             // inception_4a/relu_5x5
74             TensorShape(14U, 14U, 48U),
75             // inception_4a/relu_pool_proj, inception_4b/relu_5x5, inception_4b/relu_pool_proj, inception_4c/relu_5x5, inception_4c/relu_pool_proj, inception_4d/relu_5x5, inception_4d/relu_pool_proj
76             TensorShape(14U, 14U, 64U),
77             // inception_4b/relu_1x1, inception_4e/relu_3x3_reduce
78             TensorShape(14U, 14U, 160U),
79             // inception_4b/relu_3x3_reduce, inception_4d/relu_1x1
80             TensorShape(14U, 14U, 112U),
81             // inception_4b/relu_3x3
82             TensorShape(14U, 14U, 224U),
83             // inception_4b/relu_5x5_reduce, inception_4c/relu_5x5_reduce
84             TensorShape(14U, 14U, 24U),
85             // inception_4c/relu_1x1, inception_4c/relu_3x3_reduce, inception_4e/relu_5x5, inception_4e/relu_pool_proj
86             TensorShape(14U, 14U, 128U),
87             // inception_4c/relu_3x3, inception_4e/relu_1x1
88             TensorShape(14U, 14U, 256U),
89             // inception_4d/relu_3x3_reduce
90             TensorShape(14U, 14U, 144U),
91             // inception_4d/relu_3x3
92             TensorShape(14U, 14U, 288U),
93             // inception_4d/relu_5x5_reduce, inception_4e/relu_5x5_reduce
94             TensorShape(14U, 14U, 32U),
95             // inception_4e/relu_3x3
96             TensorShape(14U, 14U, 320U),
97             // inception_5a/relu_1x1
98             TensorShape(7U, 7U, 256U),
99             // inception_5a/relu_3x3_reduce
100             TensorShape(7U, 7U, 160U),
101             // inception_5a/relu_3x3
102             TensorShape(7U, 7U, 320U),
103             // inception_5a/relu_5x5_reduce
104             TensorShape(7U, 7U, 32U),
105             // inception_5a/relu_5x5, inception_5a/relu_pool_proj, inception_5b/relu_5x5, inception_5b/relu_pool_proj
106             TensorShape(7U, 7U, 128U),
107             // inception_5b/relu_1x1, inception_5b/relu_3x3
108             TensorShape(7U, 7U, 384U),
109             // inception_5b/relu_3x3_reduce
110             TensorShape(7U, 7U, 192U),
111             // inception_5b/relu_5x5_reduce
112             TensorShape(7U, 7U, 48U) }),
113         framework::dataset::make("Info", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))
114     }
115     {
116     }
117     GoogLeNetInceptionV1ActivationLayerDataset(GoogLeNetInceptionV1ActivationLayerDataset &&) = default;
118     ~GoogLeNetInceptionV1ActivationLayerDataset()                                             = default;
119 };
120 } // namespace datasets
121 } // namespace test
122 } // namespace arm_compute
123 #endif /* ARM_COMPUTE_TEST_GOOGLENETINCEPTIONV1_ACTIVATION_LAYER_DATASET */
124