ie_convolution_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 <vector>
10 #include <string>
11 
12 namespace InferenceEngine {
13 namespace Builder {
14 
15 /**
16  * @brief The class represents a builder for ArgMax layer
17  */
18 class INFERENCE_ENGINE_API_CLASS(ConvolutionLayer): public LayerDecorator {
19 public:
20  /**
21  * @brief The constructor creates a builder with the name
22  * @param name Layer name
23  */
24  explicit ConvolutionLayer(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 ConvolutionLayer(const Layer::Ptr& layer);
30  /**
31  * @brief The constructor creates a builder from generic builder
32  * @param layer constant pointer to generic builder
33  */
34  explicit ConvolutionLayer(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  ConvolutionLayer& 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 port Input port
50  * @return reference to layer builder
51  */
52  ConvolutionLayer& setInputPort(const Port& port);
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  ConvolutionLayer& setOutputPort(const Port& port);
64  /**
65  * @brief Returns kernel size
66  * @return Kernel size
67  */
68  const std::vector<size_t> getKernel() const;
69  /**
70  * @brief Sets kernel size
71  * @param kernel Kernel size
72  * @return reference to layer builder
73  */
74  ConvolutionLayer& setKernel(const std::vector<size_t>& kernel);
75  /**
76  * @brief Returns vector of strides
77  * @return vector of strides
78  */
79  const std::vector<size_t> getStrides() const;
80  /**
81  * @brief Sets strides
82  * @param strides vector of strides
83  * @return reference to layer builder
84  */
85  ConvolutionLayer& setStrides(const std::vector<size_t>& strides);
86  /**
87  * @brief Returns dilations
88  * @return vector of dilations
89  */
90  const std::vector<size_t> getDilation() const;
91  /**
92  * @brief Sets dilations
93  * @param dilation Vector of dilations
94  * @return reference to layer builder
95  */
96  ConvolutionLayer& setDilation(const std::vector<size_t>& dilation);
97  /**
98  * @brief Returns begin paddings
99  * @return vector of paddings
100  */
101  const std::vector<size_t> getPaddingsBegin() const;
102  /**
103  * @brief Sets begin paddings
104  * @param paddings Vector of paddings
105  * @return reference to layer builder
106  */
107  ConvolutionLayer& setPaddingsBegin(const std::vector<size_t>& paddings);
108  /**
109  * @brief Return end paddings
110  * @return Vector of paddings
111  */
112  const std::vector<size_t> getPaddingsEnd() const;
113  /**
114  * @brief Sets end paddings
115  * @param paddings Vector of paddings
116  * @return reference to layer builder
117  */
118  ConvolutionLayer& setPaddingsEnd(const std::vector<size_t>& paddings);
119  /**
120  * @brief Returns group
121  * @return Group
122  */
123  size_t getGroup() const;
124  /**
125  * @brief Sets group
126  * @param group Group
127  * @return reference to layer builder
128  */
129  ConvolutionLayer& setGroup(size_t group);
130  /**
131  * @brief Return output depth
132  * @return Output depth
133  */
134  size_t getOutDepth() const;
135  /**
136  * @brief Sets output depth
137  * @param outDepth Output depth
138  * @return reference to layer builder
139  */
140  ConvolutionLayer& setOutDepth(size_t outDepth);
141 };
142 
143 } // namespace Builder
144 } // namespace InferenceEngine
Definition: ie_argmax_layer.hpp:11