ie_roi_pooling_layer.hpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include <builders/ie_layer_decorator.hpp>
8 #include <ie_network.hpp>
9 #include <string>
10 #include <vector>
11 
12 namespace InferenceEngine {
13 namespace Builder {
14 
15 /**
16  * @deprecated Use ngraph API instead.
17  * @brief The class represents a builder for ROIPooling layer
18  */
19 IE_SUPPRESS_DEPRECATED_START
20 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(ROIPoolingLayer): public LayerDecorator {
21 public:
22  /**
23  * @brief The constructor creates a builder with the name
24  * @param name Layer name
25  */
26  explicit ROIPoolingLayer(const std::string& name = "");
27  /**
28  * @brief The constructor creates a builder from generic builder
29  * @param layer pointer to generic builder
30  */
31  explicit ROIPoolingLayer(const Layer::Ptr& layer);
32  /**
33  * @brief The constructor creates a builder from generic builder
34  * @param layer constant pointer to generic builder
35  */
36  explicit ROIPoolingLayer(const Layer::CPtr& layer);
37  /**
38  * @brief Sets the name for the layer
39  * @param name Layer name
40  * @return reference to layer builder
41  */
42  ROIPoolingLayer& setName(const std::string& name);
43 
44  /**
45  * @brief Returns input ports
46  * @return Vector of input ports
47  */
48  const std::vector<Port>& getInputPorts() const;
49  /**
50  * @brief Sets input ports
51  * @param ports Vector of input ports
52  * @return reference to layer builder
53  */
54  ROIPoolingLayer& setInputPorts(const std::vector<Port>& ports);
55  /**
56  * @brief Returns output port
57  * @return Output port
58  */
59  const Port& getOutputPort() const;
60  /**
61  * @brief Sets output port
62  * @param port Output port
63  * @return reference to layer builder
64  */
65  ROIPoolingLayer& setOutputPort(const Port& port);
66  /**
67  * @brief Returns a ratio of the input feature map over the input image size
68  * @return Spatial scale
69  */
70  float getSpatialScale() const;
71  /**
72  * @brief Sets a ratio of the input feature map over the input image size
73  * @param spatialScale Spatial scale
74  * @return reference to layer builder
75  */
76  ROIPoolingLayer& setSpatialScale(float spatialScale);
77  /**
78  * @brief Returns height and width of the ROI output feature map
79  * @return Vector contains height and width
80  */
81  const std::vector<int> getPooled() const;
82  /**
83  * @brief Sets height and width of the ROI output feature map
84  * @param pooled Vector with height and width
85  * @return reference to layer builder
86  */
87  ROIPoolingLayer& setPooled(const std::vector<int>& pooled);
88 };
89 IE_SUPPRESS_DEPRECATED_END
90 
91 } // namespace Builder
92 } // namespace InferenceEngine
Inference Engine API.
Definition: ie_argmax_layer.hpp:11