ie_resample_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 Resample layer
22  */
23 IE_SUPPRESS_DEPRECATED_START
24 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(ResampleLayer): public LayerDecorator {
25 public:
26  /**
27  * @brief The constructor creates a builder with the name
28  * @param name Layer name
29  */
30  explicit ResampleLayer(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 ResampleLayer(const Layer::Ptr& layer);
36  /**
37  * @brief The constructor creates a builder from generic builder
38  * @param layer const pointer to generic builder
39  */
40  explicit ResampleLayer(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  ResampleLayer& setName(const std::string& name);
47 
48  /**
49  * @brief Returns input port
50  * @return Input port
51  */
52  const Port& getInputPort() const;
53  /**
54  * @brief Sets input port
55  * @param ports Input port
56  * @return reference to layer builder
57  */
58  ResampleLayer& setInputPort(const Port& ports);
59  /**
60  * @brief Returns output port
61  * @return Output port
62  */
63  const Port& getOutputPort() const;
64  /**
65  * @brief Sets output port
66  * @param port Output port
67  * @return reference to layer builder
68  */
69  ResampleLayer& setOutputPort(const Port& port);
70  /**
71  * @brief Returns resample type
72  * @return Type
73  */
74  const std::string& getResampleType() const;
75  /**
76  * @brief Sets resample type
77  * @param type Type
78  * @return reference to layer builder
79  */
80  ResampleLayer& setResampleType(const std::string& type);
81  /**
82  * @brief Returns flag that denotes whether to perform anti-aliasing
83  * @return true if anti-aliasing is performed
84  */
85  bool getAntialias() const;
86  /**
87  * @brief Sets flag that denotes whether to perform anti-aliasing
88  * @param antialias flag
89  * @return reference to layer builder
90  */
91  ResampleLayer& setAntialias(bool antialias);
92  /**
93  * @brief Returns resample factor
94  * @return Factor
95  */
96  float getFactor() const;
97  /**
98  * @brief Sets resample factor
99  * @param factor Factor
100  * @return reference to layer builder
101  */
102  ResampleLayer& setFactor(float factor);
103  /**
104  * @brief Returns width
105  * @return Width
106  */
107  size_t getWidth() const;
108  /**
109  * @brief Sets width
110  * @param width Width
111  * @return reference to layer builder
112  */
113  ResampleLayer& setWidth(size_t width);
114  /**
115  * @brief Returns height
116  * @return Height
117  */
118  size_t getHeight() const;
119  /**
120  * @brief Sets height
121  * @param height Height
122  * @return reference to layer builder
123  */
124  ResampleLayer& setHeight(size_t height);
125 };
126 IE_SUPPRESS_DEPRECATED_END
127 
128 } // namespace Builder
129 } // 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
The class represents a builder for Resample layer.
Definition: ie_resample_layer.hpp:24
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
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
std::string type
Layer type.
Definition: ie_layers.h:47