ie_const_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 
11 namespace InferenceEngine {
12 namespace Builder {
13 
14 /**
15  * @deprecated Use ngraph API instead.
16  * @brief The class represents a builder for Const layer
17  */
18 IE_SUPPRESS_DEPRECATED_START
19 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(ConstLayer): public LayerDecorator {
20 public:
21  /**
22  * @brief The constructor creates a builder with the name
23  * @param name Layer name
24  */
25  explicit ConstLayer(const std::string& name = "");
26  /**
27  * @brief The constructor creates a builder from generic builder
28  * @param layer pointer to generic builder
29  */
30  explicit ConstLayer(const Layer::Ptr& layer);
31  /**
32  * @brief The constructor creates a builder from generic builder
33  * @param layer constant pointer to generic builder
34  */
35  explicit ConstLayer(const Layer::CPtr& layer);
36  /**
37  * @brief Sets the name for the layer
38  * @param name Layer name
39  * @return reference to layer builder
40  */
41  ConstLayer& setName(const std::string& name);
42 
43  /**
44  * @brief Returns port with shapes for the layer
45  * @return Port with shapes
46  */
47  const Port& getPort() const;
48  /**
49  * @brief Sets port shapes for the layer
50  * @param port Port with shapes
51  * @return reference to layer builder
52  */
53  ConstLayer& setPort(const Port& port);
54 
55  /**
56  * @brief Sets constant data
57  * @param data constant blob with data
58  * @return reference to layer builder
59  */
60  ConstLayer& setData(const Blob::CPtr& data);
61 
62  /**
63  * @brief Returns constant data
64  * @return constant blob with data
65  */
66  const Blob::CPtr& getData() const;
67 };
68 IE_SUPPRESS_DEPRECATED_END
69 
70 } // namespace Builder
71 } // namespace InferenceEngine
Inference Engine API.
Definition: ie_argmax_layer.hpp:11
std::shared_ptr< const Blob > CPtr
A smart pointer to the const Blob object.
Definition: ie_blob.h:45