ie_psroi_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 PSROIPooling layer
17  */
18 class INFERENCE_ENGINE_API_CLASS(PSROIPoolingLayer): public LayerFragment {
19 public:
20  /**
21  * @brief The constructor creates a builder with the name
22  * @param name Layer name
23  */
24  explicit PSROIPoolingLayer(const std::string& name = "");
25  /**
26  * @brief The constructor creates a builder from generic builder
27  * @param genLayer generic builder
28  */
29  explicit PSROIPoolingLayer(Layer& genLayer);
30  /**
31  * @brief Sets the name for the layer
32  * @param name Layer name
33  * @return reference to layer builder
34  */
35  PSROIPoolingLayer& 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  PSROIPoolingLayer& setInputPorts(const std::vector<Port>& ports);
48  /**
49  * @brief Returns output ports
50  * @return Vector of output ports
51  */
52  const Port& getOutputPort() const;
53  /**
54  * @brief Sets output ports
55  * @param port Vector of output ports
56  * @return reference to layer builder
57  */
58  PSROIPoolingLayer& setOutputPort(const Port& port);
59  /**
60  * @brief Returns multiplicative spatial scale factor to translate ROI coordinates
61  * @return Spatial scale factor
62  */
63  float getSpatialScale() const;
64  /**
65  * @brief Sets multiplicative spatial scale factor to translate ROI coordinates
66  * @param spatialScale Spatial scale factor
67  * @return reference to layer builder
68  */
69  PSROIPoolingLayer& setSpatialScale(float spatialScale);
70  /**
71  * @brief Returns pooled output channel number
72  * @return Output channel number
73  */
74  size_t getOutputDim() const;
75  /**
76  * @brief Sets pooled output channel number
77  * @param outDim Output channel number
78  * @return reference to layer builder
79  */
80  PSROIPoolingLayer& setOutputDim(size_t outDim);
81  /**
82  * @brief Returns number of groups to encode position-sensitive score maps
83  * @return Number of groups
84  */
85  size_t getGroupSize() const;
86  /**
87  * @brief Sets number of groups to encode position-sensitive score maps
88  * @param size Number of groups
89  * @return reference to layer builder
90  */
91  PSROIPoolingLayer& setGroupSize(size_t size);
92 };
93 
94 } // namespace Builder
95 } // namespace InferenceEngine
96 
97 
98 
Definition: ie_argmax_layer.hpp:11
a header file for the Inference Engine Network interface