ie_const_layer.hpp
1 // Copyright (C) 2018 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include <builders/ie_layer_fragment.hpp>
8 #include <ie_inetwork.hpp>
9 #include <string>
10 
11 namespace InferenceEngine {
12 namespace Builder {
13 
14 /**
15  * @brief The class represents a builder for Const layer
16  */
17 class INFERENCE_ENGINE_API_CLASS(ConstLayer): public LayerFragment {
18 public:
19  /**
20  * @brief The constructor creates a builder with the name
21  * @param name Layer name
22  */
23  explicit ConstLayer(const std::string& name = "");
24  /**
25  * @brief The constructor creates a builder from generic builder
26  * @param genLayer generic builder
27  */
28  explicit ConstLayer(Layer& genLayer);
29  /**
30  * @brief Sets the name for the layer
31  * @param name Layer name
32  * @return reference to layer builder
33  */
34  ConstLayer& setName(const std::string& name);
35 
36  /**
37  * @brief Returns port with shapes for the layer
38  * @return Port with shapes
39  */
40  const Port& getPort() const;
41  /**
42  * @brief Sets port shapes for the layer
43  * @param port Port with shapes
44  * @return reference to layer builder
45  */
46  ConstLayer& setPort(const Port& port);
47 
48  /**
49  * @brief Sets constant data
50  * @param data constant blob with data
51  * @return reference to layer builder
52  */
53  ConstLayer& setData(const Blob::CPtr& data);
54 };
55 
56 } // namespace Builder
57 } // namespace InferenceEngine
Definition: ie_argmax_layer.hpp:11
a header file for the Inference Engine Network interface
std::shared_ptr< const Blob > CPtr
A smart pointer to the const Blob object.
Definition: ie_blob.h:43