Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / include / builders / 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  * @brief The class represents a builder for ROIPooling layer
17  */
18 class INFERENCE_ENGINE_API_CLASS(ROIPoolingLayer): public LayerDecorator {
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 layer pointer to generic builder
28      */
29     explicit ROIPoolingLayer(const Layer::Ptr& layer);
30     /**
31      * @brief The constructor creates a builder from generic builder
32      * @param layer constant pointer to generic builder
33      */
34     explicit ROIPoolingLayer(const Layer::CPtr& layer);
35     /**
36      * @brief Sets the name for the layer
37      * @param name Layer name
38      * @return reference to layer builder
39      */
40     ROIPoolingLayer& setName(const std::string& name);
41
42     /**
43      * @brief Returns input ports
44      * @return Vector of input ports
45      */
46     const std::vector<Port>& getInputPorts() const;
47     /**
48      * @brief Sets input ports
49      * @param ports Vector of input ports
50      * @return reference to layer builder
51      */
52     ROIPoolingLayer& setInputPorts(const std::vector<Port>& ports);
53     /**
54      * @brief Returns output port
55      * @return Output port
56      */
57     const Port& getOutputPort() const;
58     /**
59      * @brief Sets output port
60      * @param port Output port
61      * @return reference to layer builder
62      */
63     ROIPoolingLayer& setOutputPort(const Port& port);
64     /**
65      * @brief Returns a ratio of the input feature map over the input image size
66      * @return Spatial scale
67      */
68     float getSpatialScale() const;
69     /**
70      * @brief Sets a ratio of the input feature map over the input image size
71      * @param spatialScale Spatial scale
72      * @return reference to layer builder
73      */
74     ROIPoolingLayer& setSpatialScale(float spatialScale);
75     /**
76      * @brief Returns height and width of the ROI output feature map
77      * @return Vector contains height and width
78      */
79     const std::vector<int> getPooled() const;
80     /**
81      * @brief Sets height and width of the ROI output feature map
82      * @param pooled Vector with height and width
83      * @return reference to layer builder
84      */
85     ROIPoolingLayer& setPooled(const std::vector<int>& pooled);
86 };
87
88 }  // namespace Builder
89 }  // namespace InferenceEngine