ie_resample_layer.hpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include <builders/ie_layer_decorator.hpp>
8 #include <ie_network.hpp>
9 #include <string>
10 #include <vector>
11 
12 namespace InferenceEngine {
13 namespace Builder {
14 
15 /**
16  * @brief The class represents a builder for Resample layer
17  */
18 class INFERENCE_ENGINE_API_CLASS(ResampleLayer): public LayerDecorator {
19 public:
20  /**
21  * @brief The constructor creates a builder with the name
22  * @param name Layer name
23  */
24  explicit ResampleLayer(const std::string& name = "");
25  /**
26  * @brief The constructor creates a builder from generic builder
27  * @param layer pointer to generic builder
28  */
29  explicit ResampleLayer(const Layer::Ptr& layer);
30  /**
31  * @brief The constructor creates a builder from generic builder
32  * @param layer const pointer to generic builder
33  */
34  explicit ResampleLayer(const Layer::CPtr& layer);
35  /**
36  * @brief Sets the name for the layer
37  * @param name Layer name
38  * @return reference to layer builder
39  */
40  ResampleLayer& setName(const std::string& name);
41 
42  /**
43  * @brief Returns input port
44  * @return Input port
45  */
46  const Port& getInputPort() const;
47  /**
48  * @brief Sets input port
49  * @param ports Input port
50  * @return reference to layer builder
51  */
52  ResampleLayer& setInputPort(const Port& ports);
53  /**
54  * @brief Returns output port
55  * @return Output port
56  */
57  const Port& getOutputPort() const;
58  /**
59  * @brief Sets output port
60  * @param port Output port
61  * @return reference to layer builder
62  */
63  ResampleLayer& setOutputPort(const Port& port);
64  /**
65  * @brief Returns resample type
66  * @return Type
67  */
68  const std::string& getResampleType() const;
69  /**
70  * @brief Sets resample type
71  * @param type Type
72  * @return reference to layer builder
73  */
74  ResampleLayer& setResampleType(const std::string& type);
75  /**
76  * @brief Returns flag that denotes whether to perform anti-aliasing
77  * @return true if anti-aliasing is performed
78  */
79  bool getAntialias() const;
80  /**
81  * @brief Sets flag that denotes whether to perform anti-aliasing
82  * @param flag antialias
83  * @return reference to layer builder
84  */
85  ResampleLayer& setAntialias(bool antialias);
86  /**
87  * @brief Returns resample factor
88  * @return Factor
89  */
90  float getFactor() const;
91  /**
92  * @brief Sets resample factor
93  * @param factor Factor
94  * @return reference to layer builder
95  */
96  ResampleLayer& setFactor(float factor);
97  /**
98  * @brief Returns width
99  * @return Width
100  */
101  size_t getWidth() const;
102  /**
103  * @brief Sets width
104  * @param width Width
105  * @return reference to layer builder
106  */
107  ResampleLayer& setWidth(size_t width);
108  /**
109  * @brief Returns height
110  * @return Height
111  */
112  size_t getHeight() const;
113  /**
114  * @brief Sets height
115  * @param height Height
116  * @return reference to layer builder
117  */
118  ResampleLayer& setHeight(size_t height);
119 };
120 
121 } // namespace Builder
122 } // namespace InferenceEngine
123 
124 
125 
126 
Definition: ie_argmax_layer.hpp:11