1 // Copyright (C) 2018 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
7 #include <builders/ie_layer_fragment.hpp>
8 #include <ie_inetwork.hpp>
12 namespace InferenceEngine {
16 * @brief The class represents a builder for ROIPooling layer
18 class INFERENCE_ENGINE_API_CLASS(ROIPoolingLayer): public LayerFragment {
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 genLayer generic builder
29 explicit ROIPoolingLayer(Layer& genLayer);
31 * @brief Sets the name for the layer
32 * @param name Layer name
33 * @return reference to layer builder
35 ROIPoolingLayer& setName(const std::string& name);
38 * @brief Returns input ports
39 * @return Vector of input ports
41 const std::vector<Port>& getInputPorts() const;
43 * @brief Sets input ports
44 * @param ports Vector of input ports
45 * @return reference to layer builder
47 ROIPoolingLayer& setInputPorts(const std::vector<Port>& ports);
49 * @brief Returns output port
52 const Port& getOutputPort() const;
54 * @brief Sets output port
55 * @param port Output port
56 * @return reference to layer builder
58 ROIPoolingLayer& setOutputPort(const Port& port);
60 * @brief Returns a ratio of the input feature map over the input image size
61 * @return Spatial scale
63 float getSpatialScale() const;
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
69 ROIPoolingLayer& setSpatialScale(float spatialScale);
71 * @brief Returns height and width of the ROI output feature map
72 * @return Vector contains height and width
74 const std::vector<int> getPooled() const;
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
80 ROIPoolingLayer& setPooled(const std::vector<int>& pooled);
83 } // namespace Builder
84 } // namespace InferenceEngine