Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / mkldnn_plugin / nodes / mkldnn_roi_pooling_node.h
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6
7 #include <ie_common.h>
8 #include <mkldnn_node.h>
9 #include <string>
10 #include <memory>
11 #include <vector>
12
13 namespace MKLDNNPlugin {
14
15 class MKLDNNROIPoolingNode : public MKLDNNNode {
16 public:
17     MKLDNNROIPoolingNode(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng);
18     ~MKLDNNROIPoolingNode() override = default;
19
20     void getSupportedDescriptors() override;
21     void createDescriptor(const std::vector<InferenceEngine::TensorDesc>& inputDesc,
22                           const std::vector<InferenceEngine::TensorDesc>& outputDesc) override;
23     void createPrimitive() override;
24     bool created() const override;
25
26 private:
27     static Register<MKLDNNROIPoolingNode> reg;
28     int pooled_h = 0;
29     int pooled_w = 0;
30     float spatial_scale = 0;
31     mkldnn::algorithm method = mkldnn::algorithm::roi_pooling_max;
32 };
33
34 }  // namespace MKLDNNPlugin
35