ie_lrn_layer.hpp
1 // Copyright (C) 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 LRN layer
17  */
18 IE_SUPPRESS_DEPRECATED_START
19 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(LRNLayer): public LayerDecorator {
20 public:
21  /**
22  * @brief The constructor creates a builder with the name
23  * @param name Layer name
24  */
25  explicit LRNLayer(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 LRNLayer(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 LRNLayer(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  LRNLayer& 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  LRNLayer& setPort(const Port& port);
54  /**
55  * @brief Returns side length of the region
56  * @return Size
57  */
58  size_t getSize() const;
59  /**
60  * @brief Sets side length of the region
61  * @param size Size
62  * @return reference to layer builder
63  */
64  LRNLayer& setSize(size_t size);
65  /**
66  * @brief Returns scaling parameter for the normalizing sum
67  * @return Scaling parameter
68  */
69  float getAlpha() const;
70  /**
71  * @brief Sets scaling parameter for the normalizing sum
72  * @param alpha Scaling parameter
73  * @return reference to layer builder
74  */
75  LRNLayer& setAlpha(float alpha);
76  /**
77  * @brief Returns exponent for the normalizing sum
78  * @return Exponent
79  */
80  float getBeta() const;
81  /**
82  * @brief Sets exponent for the normalizing sum
83  * @param beta Exponent
84  * @return reference to layer builder
85  */
86  LRNLayer& setBeta(float beta);
87  /**
88  * @brief Returns region type
89  * @return true if normalizing sum is performed over adjacent channels
90  */
91  float getBias() const;
92  /**
93  * @brief Sets bias for the normalizing sum
94  * @param bias Bias
95  * @return reference to layer builder
96  */
97  LRNLayer& setBias(float bias);
98 };
99 IE_SUPPRESS_DEPRECATED_END
100 
101 } // namespace Builder
102 } // namespace InferenceEngine
Inference Engine API.
Definition: ie_argmax_layer.hpp:11