ie_psroi_pooling_layer.hpp
Go to the documentation of this file.
1 // Copyright (C) 2018-2020 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 /**
6  * @file
7  */
8 
9 #pragma once
10 
12 #include <ie_network.hpp>
13 #include <string>
14 #include <vector>
15 
16 namespace InferenceEngine {
17 namespace Builder {
18 
19 /**
20  * @deprecated Use ngraph API instead.
21  * @brief The class represents a builder for PSROIPooling layer
22  */
23 IE_SUPPRESS_DEPRECATED_START
24 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(PSROIPoolingLayer): public LayerDecorator {
25 public:
26  /**
27  * @brief The constructor creates a builder with the name
28  * @param name Layer name
29  */
30  explicit PSROIPoolingLayer(const std::string& name = "");
31  /**
32  * @brief The constructor creates a builder from generic builder
33  * @param layer pointer to generic builder
34  */
35  explicit PSROIPoolingLayer(const Layer::Ptr& layer);
36  /**
37  * @brief The constructor creates a builder from generic builder
38  * @param layer constant pointer to generic builder
39  */
40  explicit PSROIPoolingLayer(const Layer::CPtr& layer);
41  /**
42  * @brief Sets the name for the layer
43  * @param name Layer name
44  * @return reference to layer builder
45  */
46  PSROIPoolingLayer& setName(const std::string& name);
47 
48  /**
49  * @brief Returns input ports
50  * @return Vector of input ports
51  */
52  const std::vector<Port>& getInputPorts() const;
53  /**
54  * @brief Sets input ports
55  * @param ports Vector of input ports
56  * @return reference to layer builder
57  */
58  PSROIPoolingLayer& setInputPorts(const std::vector<Port>& ports);
59  /**
60  * @brief Returns output ports
61  * @return Vector of output ports
62  */
63  const Port& getOutputPort() const;
64  /**
65  * @brief Sets output ports
66  * @param port Vector of output ports
67  * @return reference to layer builder
68  */
69  PSROIPoolingLayer& setOutputPort(const Port& port);
70  /**
71  * @brief Returns multiplicative spatial scale factor to translate ROI coordinates
72  * @return Spatial scale factor
73  */
74  float getSpatialScale() const;
75  /**
76  * @brief Sets multiplicative spatial scale factor to translate ROI coordinates
77  * @param spatialScale Spatial scale factor
78  * @return reference to layer builder
79  */
80  PSROIPoolingLayer& setSpatialScale(float spatialScale);
81  /**
82  * @brief Returns pooled output channel number
83  * @return Output channel number
84  */
85  size_t getOutputDim() const;
86  /**
87  * @brief Sets pooled output channel number
88  * @param outDim Output channel number
89  * @return reference to layer builder
90  */
91  PSROIPoolingLayer& setOutputDim(size_t outDim);
92  /**
93  * @brief Returns number of groups to encode position-sensitive score maps
94  * @return Number of groups
95  */
96  size_t getGroupSize() const;
97  /**
98  * @brief Sets number of groups to encode position-sensitive score maps
99  * @param size Number of groups
100  * @return reference to layer builder
101  */
102  PSROIPoolingLayer& setGroupSize(size_t size);
103 };
104 IE_SUPPRESS_DEPRECATED_END
105 
106 } // namespace Builder
107 } // namespace InferenceEngine
Inference Engine API.
Definition: ie_argmax_layer.hpp:15
std::shared_ptr< const Layer > CPtr
A shared pointer to the constant Layer builder.
Definition: ie_layer_builder.hpp:52
std::string name
Layer name.
Definition: ie_layers.h:42
This class defines the basic functional for layer builders.
Definition: ie_layer_decorator.hpp:26
std::shared_ptr< Layer > Ptr
A shared pointer to the Layer builder.
Definition: ie_layer_builder.hpp:48
The class represents a builder for PSROIPooling layer.
Definition: ie_psroi_pooling_layer.hpp:24
A header file for the Inference Engine Network interface.
This class is the main object to describe the Inference Engine port.
Definition: ie_network.hpp:230