ie_convolution_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 Convolution layer
22  */
23 IE_SUPPRESS_DEPRECATED_START
24 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(ConvolutionLayer): public LayerDecorator {
25 public:
26  /**
27  * @brief The constructor creates a builder with the name
28  * @param name Layer name
29  */
30  explicit ConvolutionLayer(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 ConvolutionLayer(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 ConvolutionLayer(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  ConvolutionLayer& 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 port Input port
56  * @return reference to layer builder
57  */
58  ConvolutionLayer& setInputPort(const Port& port);
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  ConvolutionLayer& setOutputPort(const Port& port);
70  /**
71  * @brief Returns kernel size
72  * @return Kernel size
73  */
74  const std::vector<size_t> getKernel() const;
75  /**
76  * @brief Sets kernel size
77  * @param kernel Kernel size
78  * @return reference to layer builder
79  */
80  ConvolutionLayer& setKernel(const std::vector<size_t>& kernel);
81  /**
82  * @brief Returns vector of strides
83  * @return vector of strides
84  */
85  const std::vector<size_t> getStrides() const;
86  /**
87  * @brief Sets strides
88  * @param strides vector of strides
89  * @return reference to layer builder
90  */
91  ConvolutionLayer& setStrides(const std::vector<size_t>& strides);
92  /**
93  * @brief Returns dilations
94  * @return vector of dilations
95  */
96  const std::vector<size_t> getDilation() const;
97  /**
98  * @brief Sets dilations
99  * @param dilation Vector of dilations
100  * @return reference to layer builder
101  */
102  ConvolutionLayer& setDilation(const std::vector<size_t>& dilation);
103  /**
104  * @brief Returns begin paddings
105  * @return vector of paddings
106  */
107  const std::vector<size_t> getPaddingsBegin() const;
108  /**
109  * @brief Sets begin paddings
110  * @param paddings Vector of paddings
111  * @return reference to layer builder
112  */
113  ConvolutionLayer& setPaddingsBegin(const std::vector<size_t>& paddings);
114  /**
115  * @brief Return end paddings
116  * @return Vector of paddings
117  */
118  const std::vector<size_t> getPaddingsEnd() const;
119  /**
120  * @brief Sets end paddings
121  * @param paddings Vector of paddings
122  * @return reference to layer builder
123  */
124  ConvolutionLayer& setPaddingsEnd(const std::vector<size_t>& paddings);
125  /**
126  * @brief Returns group
127  * @return Group
128  */
129  size_t getGroup() const;
130  /**
131  * @brief Sets group
132  * @param group Group
133  * @return reference to layer builder
134  */
135  ConvolutionLayer& setGroup(size_t group);
136  /**
137  * @brief Return output depth
138  * @return Output depth
139  */
140  size_t getOutDepth() const;
141  /**
142  * @brief Sets output depth
143  * @param outDepth Output depth
144  * @return reference to layer builder
145  */
146  ConvolutionLayer& setOutDepth(size_t outDepth);
147 };
148 IE_SUPPRESS_DEPRECATED_END
149 
150 } // namespace Builder
151 } // namespace InferenceEngine
The class represents a builder for Convolution layer.
Definition: ie_convolution_layer.hpp:24
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
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
unsigned int group
The group of output shuffled channels.
Definition: ie_layers.h:1591