ie_prelu_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 PReLU layer
16  */
17 class INFERENCE_ENGINE_API_CLASS(PReLULayer): public LayerFragment {
18 public:
19  /**
20  * @brief The constructor creates a builder with the name
21  * @param name Layer name
22  */
23  explicit PReLULayer(const std::string& name = "");
24  /**
25  * @brief The constructor creates a builder from generic builder
26  * @param genLayer generic builder
27  */
28  explicit PReLULayer(Layer& genLayer);
29  /**
30  * @brief Sets the name for the layer
31  * @param name Layer name
32  * @return reference to layer builder
33  */
34  PReLULayer& setName(const std::string& name);
35 
36  /**
37  * @brief Sets weights for layer
38  * @param weights Constant blob with weights
39  * @return reference to layer builder
40  */
41  PReLULayer& setWeights(const Blob::CPtr& weights);
42  /**
43  * @brief Returns port with shapes for the layer
44  * @return Port with shapes
45  */
46  const Port& getPort() const;
47  /**
48  * @brief Sets port shapes for the layer
49  * @param port Port with shapes
50  * @return reference to layer builder
51  */
52  PReLULayer& setPort(const Port& port);
53  /**
54  * @brief Returns channel shared flag
55  * @return true if negative slope shared across channels
56  */
57  bool getChannelShared() const;
58  /**
59  * @brief Sets channel shared flag
60  * @param flag true if negative slope shared across channels
61  * @return reference to layer builder
62  */
63  PReLULayer& setChannelShared(bool flag);
64 };
65 
66 } // namespace Builder
67 } // 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