ie_reshape_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 Reshape layer
22  */
23 IE_SUPPRESS_DEPRECATED_START
24 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(ReshapeLayer): public LayerDecorator {
25 public:
26  /**
27  * @brief The constructor creates a builder with the name
28  * @param name Layer name
29  */
30  explicit ReshapeLayer(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 ReshapeLayer(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 ReshapeLayer(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  ReshapeLayer& 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  ReshapeLayer& 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  ReshapeLayer& setOutputPort(const Port& port);
70  /**
71  * @brief Returns reshape dimensions
72  * @return Dimensions
73  */
74  const std::vector<int> getDims() const;
75  /**
76  * @brief Sets reshape dimensions
77  * @param dims Dimensions
78  * @return reference to layer builder
79  */
80  ReshapeLayer& setDims(const std::vector<int>& dims);
81 };
82 IE_SUPPRESS_DEPRECATED_END
83 
84 } // namespace Builder
85 } // 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 Reshape layer.
Definition: ie_reshape_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