ie_crop_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 Crop layer
17  */
18 class INFERENCE_ENGINE_API_CLASS(CropLayer): public LayerDecorator {
19 public:
20  /**
21  * @brief The constructor creates a builder with the name
22  * @param name Layer name
23  */
24  explicit CropLayer(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 CropLayer(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 CropLayer(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  CropLayer& setName(const std::string& name);
41 
42  /**
43  * @brief Returns input ports
44  * @return Vector of input ports
45  */
46  const std::vector<Port>& getInputPorts() const;
47  /**
48  * @brief Sets input ports
49  * @param port Vector of input ports
50  * @return reference to layer builder
51  */
52  CropLayer& setInputPorts(const std::vector<Port>& ports);
53  /**
54  * @brief Return 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  CropLayer& setOutputPort(const Port& port);
64  /**
65  * @brief Returns axis
66  * @return Vector of axis
67  */
68  const std::vector<size_t> getAxis() const;
69  /**
70  * @brief Sets axis
71  * @param axis Vector of axis
72  * @return reference to layer builder
73  */
74  CropLayer& setAxis(const std::vector<size_t>& axis);
75  /**
76  * @brief Returns offsets
77  * @return Vector of offsets
78  */
79  const std::vector<size_t> getOffset() const;
80  /**
81  * @brief Sets offsets
82  * @param offsets Vector of offsets
83  * @return reference to layer builder
84  */
85  CropLayer& setOffset(const std::vector<size_t>& offsets);
86 };
87 
88 } // namespace Builder
89 } // namespace InferenceEngine
Definition: ie_argmax_layer.hpp:11