Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / tests / unit / engines / mkldnn / graph / layers / internal / graph_activation_test.cpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #include <gtest/gtest.h>
6 #include <gmock/gmock-spec-builders.h>
7 #include "mkldnn_plugin/mkldnn_graph.h"
8 #include "test_graph.hpp"
9 #include "single_layer_common.hpp"
10 #include <mkldnn_plugin/mkldnn_extension_utils.h>
11 #include <inference_engine/cnn_network_impl.hpp>
12 #include "tests_common.hpp"
13
14 using namespace ::testing;
15 using namespace std;
16 using namespace mkldnn;
17
18 struct activation_test_params {
19     mkldnn::algorithm alg;
20     float alpha;
21     float beta;
22
23     // Formats: NCHW, NCDHW
24     vector<size_t> dims;
25
26     size_t num_prim_desc;
27
28     MKLDNNPlugin::impl_desc_type selectedType;
29     std::vector<MKLDNNPlugin::impl_desc_type> preferTypes;
30
31     std::vector<std::function<void(MKLDNNPlugin::PrimitiveDescInfo)>> comp;
32 };
33
34 template <typename T, typename A> inline T relu_fwd(T s, A alpha) {
35     return s > 0 ? s : static_cast<T>(s * alpha);
36 }
37
38 template <typename T, typename A> T elu_fwd(T s, A alpha) {
39     return s > 0 ? s : static_cast<T>(alpha * (::expf(s) - 1));
40 }
41
42 template <typename T>
43 T logistic_fwd(T s) {
44     T v = ::expf(s);
45     return v / (v + 1);
46 }
47
48 template <typename T, typename A>
49 T bounded_relu_fwd(T s, A alpha) {
50     s = s > 0 ? s : 0;
51     return s > alpha ? (T)(alpha) : s;
52 }
53
54 template <typename T> T tanh_fwd(T s) {
55     return static_cast<T>(::tanhf((float)s));
56 }
57
58 template <typename data_t>
59 void ref_activation(const InferenceEngine::TBlob<data_t> &src, InferenceEngine::TBlob<data_t> &dst, activation_test_params prm) {
60     auto dims_size = src.dims().size();
61     
62     size_t IW = src.dims()[dims_size - 1];
63     size_t IH = src.dims()[dims_size - 2];
64     size_t ID = dims_size == 5 ? src.dims()[dims_size - 3] : 1u;
65     size_t IC = src.dims()[1];
66     size_t MB = src.dims()[0];
67
68     const data_t *src_data = src.readOnly();
69     data_t *dst_data = dst.data();
70
71     for(int mb = 0; mb < MB; mb++) {
72         for(int c = 0; c < IC; c++) {
73             for(int d = 0; d < ID; d++) {
74                 for(int h = 0; h < IH; h++) {
75                     for(int w = 0; w < IW; w++) {
76                         int idx = mb * IC * ID * IH * IW
77                                   + c * ID * IH * IW
78                                   + d * IH * IW
79                                   + h * IW
80                                   + w;
81
82                         switch (prm.alg) {
83                             case eltwise_relu:         dst_data[idx] = relu_fwd(src_data[idx], prm.alpha);         break;
84                             case eltwise_elu:          dst_data[idx] = elu_fwd(src_data[idx], prm.alpha);          break;
85                             case eltwise_logistic:     dst_data[idx] = logistic_fwd(src_data[idx]);                break;
86                             case eltwise_bounded_relu: dst_data[idx] = bounded_relu_fwd(src_data[idx], prm.alpha); break;
87                             case eltwise_tanh:         dst_data[idx] = tanh_fwd(src_data[idx]); break;
88                             default: assert(!"unknown alg_kind");
89                         }
90                     }
91                 }
92             }
93         }
94     }
95 }
96
97 class MKLDNNGraphActivationTests: public TestsCommon,
98                                      public WithParamInterface<activation_test_params> {
99     std::string model_t = R"V0G0N(
100 <Net Name="Activation" version="3" precision="FP32" batch="1">
101     <layers>
102         <layer name="in1" type="Input" precision="FP32" id="0">
103             <output>
104                 <port id="0">
105                     <dim>_IN_</dim>
106                     <dim>_IC_</dim>
107                     <dim>_ID_</dim>
108                     <dim>_IH_</dim>
109                     <dim>_IW_</dim>
110                 </port>
111             </output>
112         </layer>
113         <layer name="activation" id="1" type="_LT_" precision="FP32">
114             <data _P1_ _P2_ PrimitivesPriority="_IMPLS_"/>
115             <input>
116                 <port id="1">
117                     <dim>_IN_</dim>
118                     <dim>_IC_</dim>
119                     <dim>_ID_</dim>
120                     <dim>_IH_</dim>
121                     <dim>_IW_</dim>
122                 </port>
123             </input>
124             <output>
125                 <port id="2">
126                     <dim>_IN_</dim>
127                     <dim>_IC_</dim>
128                     <dim>_ID_</dim>
129                     <dim>_IH_</dim>
130                     <dim>_IW_</dim>
131                 </port>
132             </output>
133         </layer>
134     </layers>
135     <edges>
136         <edge from-layer="0" from-port="0" to-layer="1" to-port="1"/>
137     </edges>
138 </Net>
139 )V0G0N";
140
141 protected:
142     virtual void TearDown() {
143     }
144
145     std::string getModel(activation_test_params p) {
146         std::string model = model_t;
147         auto dims_size = p.dims.size();
148
149         switch (dims_size) {
150             case 3:
151                 REMOVE_LINE(model, "<dim>_IH_</dim>");
152             case 4:
153                 REMOVE_LINE(model, "<dim>_ID_</dim>");
154         }
155
156         switch (p.alg) {
157             case eltwise_relu:         REPLACE_WITH_STR(model, "_LT_", "ReLU"); break;
158             case eltwise_elu:          REPLACE_WITH_STR(model, "_LT_", "ELU"); break;
159             case eltwise_logistic:     REPLACE_WITH_STR(model, "_LT_", "Sigmoid"); break;
160             case eltwise_bounded_relu: REPLACE_WITH_STR(model, "_LT_", "ReLU6"); break;
161             case eltwise_tanh:         REPLACE_WITH_STR(model, "_LT_", "Activation"); break;
162             default: assert(!"unknown alg_kind");
163         }
164
165         string P1, P2;
166         if (p.alg == eltwise_relu) {
167             P1 = string("negative_slope=\"") + to_string(p.alpha) + string("\"");
168             P2 = string("beta=\"") + to_string(p.beta) + string("\"");
169         } else if (p.alg == eltwise_bounded_relu) {
170             P1 = string("n=\"") + to_string(p.alpha) + string("\"");
171             P2 = string("beta=\"") + to_string(p.beta) + string("\"");
172         } else if (p.alg == eltwise_tanh) {
173             P1 = string("type=\"tanh\"");
174         } else {
175             P1 = string("alpha=\"") + to_string(p.alpha) + string("\"");
176             P2 = string("beta=\"") + to_string(p.beta) + string("\"");
177         }
178         REPLACE_WITH_STR(model, "_P1_", P1);
179         REPLACE_WITH_STR(model, "_P2_", P2);
180
181         REPLACE_WITH_NUM(model, "_IW_", p.dims[dims_size - 1]);
182         REPLACE_WITH_NUM(model, "_IC_", p.dims[1]);
183         REPLACE_WITH_NUM(model, "_IN_", p.dims[0]);
184         switch (dims_size) {
185             case 5:
186                 REPLACE_WITH_NUM(model, "_ID_", p.dims[dims_size - 3]);
187             case 4:
188                 REPLACE_WITH_NUM(model, "_IH_", p.dims[dims_size - 2]);
189         }
190
191         std::string impls;
192         for (const auto& preferType : p.preferTypes) {
193             if (!impls.empty())
194                 impls += ",";
195             impls += "cpu:" + MKLDNNGraphTestClass::getStrPrimitiveDescriptorType(preferType);
196         }
197         REPLACE_WITH_STR(model, "_IMPLS_", impls);
198
199         return model;
200     }
201
202     virtual void SetUp() {
203         try {
204             TestsCommon::SetUp();
205             activation_test_params p = ::testing::WithParamInterface<activation_test_params>::GetParam();
206             std::string model = getModel(p);
207
208             InferenceEngine::CNNNetReader net_reader;
209             ASSERT_NO_THROW(net_reader.ReadNetwork(model.data(), model.length()));
210
211             MKLDNNGraphTestClass graph;
212             graph.CreateGraph(net_reader.getNetwork());
213             auto& nodes = graph.getNodes();
214             for (int i = 0; i < nodes.size(); i++) {
215                 if (nodes[i]->getType() == MKLDNNPlugin::Activation) {
216                     ASSERT_LE(p.num_prim_desc, nodes[i]->getSupportedPrimitiveDescriptors().size());
217                     for (size_t j = 0; j < p.num_prim_desc && j < p.comp.size(); j++) {
218                         p.comp.at(j)(nodes[i]->getSupportedPrimitiveDescriptors().at(j));
219                     }
220                     ASSERT_NE(nullptr, nodes[i]->getSelectedPrimitiveDescriptor());
221                     ASSERT_EQ(p.selectedType,
222                               nodes[i]->getSelectedPrimitiveDescriptor()->getImplementationType() & p.selectedType);
223                 }
224             }
225
226             InferenceEngine::SizeVector dims_src = p.dims;
227             InferenceEngine::Layout layout = InferenceEngine::ANY;
228             switch (p.dims.size()) {
229                 case 4:
230                     layout = InferenceEngine::NCHW;
231                     break;
232                 case 5:
233                     layout = InferenceEngine::NCDHW;
234                     break;
235             }
236
237             InferenceEngine::Blob::Ptr src = InferenceEngine::make_shared_blob<float, const InferenceEngine::SizeVector>(InferenceEngine::Precision::FP32, layout, dims_src);
238             src->allocate();
239             fill_data(src->buffer(), src->size());
240
241             InferenceEngine::TBlob<float>* srcPtr = dynamic_cast<InferenceEngine::TBlob<float>*>(src.get());
242
243             if (srcPtr == nullptr)
244                 FAIL() << "Cannot cast blob to TBlob<float>.";
245
246             InferenceEngine::BlobMap srcs;
247             srcs.insert(std::pair<std::string, InferenceEngine::Blob::Ptr>("in1", src));
248
249             InferenceEngine::OutputsDataMap out;
250             out = net_reader.getNetwork().getOutputsInfo();
251             InferenceEngine::BlobMap outputBlobs;
252
253             std::pair<std::string, InferenceEngine::DataPtr> item = *out.begin();
254
255             InferenceEngine::TBlob<float>::Ptr output;
256             output = InferenceEngine::make_shared_blob<float>(item.second->getTensorDesc());
257             output->allocate();
258             outputBlobs[item.first] = output;
259
260             graph.Infer(srcs, outputBlobs);
261
262             InferenceEngine::TBlob<float> dst_ref(item.second->getTensorDesc());
263             dst_ref.allocate();
264
265             ref_activation(*srcPtr, dst_ref, p);
266
267             compare(*output, dst_ref, 0.0005f);
268         } catch (const InferenceEngine::details::InferenceEngineException &e) {
269             FAIL() << e.what();
270         }
271     }
272 };
273
274 TEST_P(MKLDNNGraphActivationTests, TestsActivation) {}
275
276 INSTANTIATE_TEST_CASE_P(
277         TestsActivation, MKLDNNGraphActivationTests,
278         ::testing::Values(
279                 activation_test_params{eltwise_relu, 0.0f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
280                 activation_test_params{eltwise_relu, 0.0f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
281                 activation_test_params{eltwise_relu, 0.5f, 0.5f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
282                 activation_test_params{eltwise_relu, 0.5f, 0.5f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
283                 activation_test_params{eltwise_elu, 0.5f, 0.5f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
284                 activation_test_params{eltwise_elu, 0.5f, 0.5f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
285                 activation_test_params{eltwise_elu, 1.0f, 1.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
286                 activation_test_params{eltwise_elu, 1.0f, 1.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
287                 activation_test_params{eltwise_logistic, 0.0f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
288                 activation_test_params{eltwise_logistic, 0.0f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
289                 activation_test_params{eltwise_bounded_relu, 6.0f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
290                 activation_test_params{eltwise_bounded_relu, 6.0f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
291                 activation_test_params{eltwise_bounded_relu, 0.1f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
292                 activation_test_params{eltwise_bounded_relu, 0.1f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
293                 activation_test_params{eltwise_relu, 0.0f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
294                 activation_test_params{eltwise_relu, 0.0f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
295                 activation_test_params{eltwise_relu, 0.5f, 0.5f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
296                 activation_test_params{eltwise_relu, 0.5f, 0.5f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
297                 activation_test_params{eltwise_elu, 0.5f, 0.5f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
298                 activation_test_params{eltwise_elu, 0.5f, 0.5f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
299                 activation_test_params{eltwise_elu, 1.0f, 1.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
300                 activation_test_params{eltwise_elu, 1.0f, 1.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
301                 activation_test_params{eltwise_logistic, 0.0f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
302                 activation_test_params{eltwise_logistic, 0.0f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
303                 activation_test_params{eltwise_bounded_relu, 6.0f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
304                 activation_test_params{eltwise_bounded_relu, 6.0f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
305                 activation_test_params{eltwise_bounded_relu, 0.1f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
306                 activation_test_params{eltwise_bounded_relu, 0.1f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
307                 // 5D
308                 activation_test_params{eltwise_tanh, 0.f, 0.f, {1, 1, 64, 64, 64}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}}
309         ));
310
311 class MKLDNNGraphDynBatchActivationTests: public MKLDNNGraphActivationTests {
312 protected:
313     virtual void SetUp() {
314         try {
315             TestsCommon::SetUp();
316             activation_test_params p = ::testing::WithParamInterface<activation_test_params>::GetParam();
317             std::string model = getModel(p);
318             size_t MB = p.dims[0];
319             if (MB < 2)
320                 MB = 2;
321
322             InferenceEngine::CNNNetReader net_reader;
323             ASSERT_NO_THROW(net_reader.ReadNetwork(model.data(), model.length()));
324             InferenceEngine::CNNNetwork network = net_reader.getNetwork();
325             auto implNet = dynamic_cast<InferenceEngine::details::CNNNetworkImpl *>(&((InferenceEngine::ICNNNetwork&)network));
326             ASSERT_NE(nullptr, implNet) << "Failed to cast ICNNNetwork to CNNNetworkImpl";
327             InferenceEngine::ResponseDesc resp;
328             InferenceEngine::StatusCode sts  = implNet->setBatchSizeReshape(MB, &resp);
329             ASSERT_EQ((int)InferenceEngine::StatusCode::OK, sts) << resp.msg;
330
331             MKLDNNGraphTestClass graph;
332             graph.setProperty({{InferenceEngine::PluginConfigParams::KEY_DYN_BATCH_ENABLED, InferenceEngine::PluginConfigParams::YES}});
333             graph.CreateGraph(net_reader.getNetwork());
334
335             InferenceEngine::SizeVector dims_src = p.dims;
336             InferenceEngine::Layout layout = InferenceEngine::ANY;
337             switch (p.dims.size()) {
338                 case 4:
339                     layout = InferenceEngine::NCHW;
340                     break;
341                 case 5:
342                     layout = InferenceEngine::NCDHW;
343                     break;
344             }
345
346             InferenceEngine::Blob::Ptr src = InferenceEngine::make_shared_blob<float, const InferenceEngine::SizeVector>(InferenceEngine::Precision::FP32, layout, dims_src);
347             src->allocate();
348             fill_data(src->buffer(), src->size());
349
350             auto * srcPtr = dynamic_cast<InferenceEngine::TBlob<float>*>(src.get());
351
352             if (srcPtr == nullptr)
353                 FAIL() << "Cannot cast blob to TBlob<float>.";
354
355             InferenceEngine::BlobMap srcs;
356             srcs.insert(std::pair<std::string, InferenceEngine::Blob::Ptr>("in1", src));
357
358             InferenceEngine::OutputsDataMap out;
359             out = net_reader.getNetwork().getOutputsInfo();
360             InferenceEngine::BlobMap outputBlobs;
361
362             std::pair<std::string, InferenceEngine::DataPtr> item = *out.begin();
363
364             InferenceEngine::TBlob<float>::Ptr output;
365             output = InferenceEngine::make_shared_blob<float>(item.second->getTensorDesc());
366             output->allocate();
367             outputBlobs[item.first] = output;
368
369             auto checkActivation = [](const MKLDNNPlugin::MKLDNNNodePtr& node) {
370                 return node->getType() == MKLDNNPlugin::Activation;
371             };
372
373             graph.checkDynBatch(srcs, outputBlobs, MB, MB, checkActivation);
374             graph.checkDynBatch(srcs, outputBlobs, 1, MB, checkActivation);
375         } catch (const InferenceEngine::details::InferenceEngineException &e) {
376             FAIL() << e.what();
377         }
378     }
379 };
380
381 TEST_P(MKLDNNGraphDynBatchActivationTests, TestsDynBatchActivation) {}
382
383
384 INSTANTIATE_TEST_CASE_P(
385         TestsDynBatchActivation, MKLDNNGraphDynBatchActivationTests,
386         ::testing::Values(
387                 activation_test_params{eltwise_relu, 0.0f, 0.0f, {2, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
388                 activation_test_params{eltwise_relu, 0.0f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
389                 activation_test_params{eltwise_relu, 0.5f, 0.5f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
390                 activation_test_params{eltwise_relu, 0.5f, 0.5f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
391                 activation_test_params{eltwise_elu, 0.5f, 0.5f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
392                 activation_test_params{eltwise_elu, 0.5f, 0.5f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
393                 activation_test_params{eltwise_elu, 1.0f, 1.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
394                 activation_test_params{eltwise_elu, 1.0f, 1.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
395                 activation_test_params{eltwise_logistic, 0.0f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
396                 activation_test_params{eltwise_logistic, 0.0f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
397                 activation_test_params{eltwise_bounded_relu, 6.0f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
398                 activation_test_params{eltwise_bounded_relu, 6.0f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
399                 activation_test_params{eltwise_bounded_relu, 0.1f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::jit},
400                 activation_test_params{eltwise_bounded_relu, 0.1f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::jit},
401                 activation_test_params{eltwise_relu, 0.0f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
402                 activation_test_params{eltwise_relu, 0.0f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
403                 activation_test_params{eltwise_relu, 0.5f, 0.5f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
404                 activation_test_params{eltwise_relu, 0.5f, 0.5f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
405                 activation_test_params{eltwise_elu, 0.5f, 0.5f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
406                 activation_test_params{eltwise_elu, 0.5f, 0.5f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
407                 activation_test_params{eltwise_elu, 1.0f, 1.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
408                 activation_test_params{eltwise_elu, 1.0f, 1.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
409                 activation_test_params{eltwise_logistic, 0.0f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
410                 activation_test_params{eltwise_logistic, 0.0f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
411                 activation_test_params{eltwise_bounded_relu, 6.0f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
412                 activation_test_params{eltwise_bounded_relu, 6.0f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
413                 activation_test_params{eltwise_bounded_relu, 0.1f, 0.0f, {1, 32, 128, 256}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
414                 activation_test_params{eltwise_bounded_relu, 0.1f, 0.0f, {4, 3, 228, 228}, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}}
415         ));