1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
7 #include <builders/ie_layer_decorator.hpp>
8 #include <ie_network.hpp>
12 namespace InferenceEngine {
16 * @brief The class represents a builder for ROIPooling layer
18 class INFERENCE_ENGINE_API_CLASS(ROIPoolingLayer): public LayerDecorator {
21 * @brief The constructor creates a builder with the name
22 * @param name Layer name
24 explicit ROIPoolingLayer(const std::string& name = "");
26 * @brief The constructor creates a builder from generic builder
27 * @param layer pointer to generic builder
29 explicit ROIPoolingLayer(const Layer::Ptr& layer);
31 * @brief The constructor creates a builder from generic builder
32 * @param layer constant pointer to generic builder
34 explicit ROIPoolingLayer(const Layer::CPtr& layer);
36 * @brief Sets the name for the layer
37 * @param name Layer name
38 * @return reference to layer builder
40 ROIPoolingLayer& setName(const std::string& name);
43 * @brief Returns input ports
44 * @return Vector of input ports
46 const std::vector<Port>& getInputPorts() const;
48 * @brief Sets input ports
49 * @param ports Vector of input ports
50 * @return reference to layer builder
52 ROIPoolingLayer& setInputPorts(const std::vector<Port>& ports);
54 * @brief Returns output port
57 const Port& getOutputPort() const;
59 * @brief Sets output port
60 * @param port Output port
61 * @return reference to layer builder
63 ROIPoolingLayer& setOutputPort(const Port& port);
65 * @brief Returns a ratio of the input feature map over the input image size
66 * @return Spatial scale
68 float getSpatialScale() const;
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
74 ROIPoolingLayer& setSpatialScale(float spatialScale);
76 * @brief Returns height and width of the ROI output feature map
77 * @return Vector contains height and width
79 const std::vector<int> getPooled() const;
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
85 ROIPoolingLayer& setPooled(const std::vector<int>& pooled);
88 } // namespace Builder
89 } // namespace InferenceEngine