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