ie_lrn_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 
15 namespace InferenceEngine {
16 namespace Builder {
17 
18 /**
19  * @deprecated Use ngraph API instead.
20  * @brief The class represents a builder for LRN layer
21  */
22 IE_SUPPRESS_DEPRECATED_START
23 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(LRNLayer): public LayerDecorator {
24 public:
25  /**
26  * @brief The constructor creates a builder with the name
27  * @param name Layer name
28  */
29  explicit LRNLayer(const std::string& name = "");
30  /**
31  * @brief The constructor creates a builder from generic builder
32  * @param layer pointer to generic builder
33  */
34  explicit LRNLayer(const Layer::Ptr& layer);
35  /**
36  * @brief The constructor creates a builder from generic builder
37  * @param layer constant pointer to generic builder
38  */
39  explicit LRNLayer(const Layer::CPtr& layer);
40  /**
41  * @brief Sets the name for the layer
42  * @param name Layer name
43  * @return reference to layer builder
44  */
45  LRNLayer& setName(const std::string& name);
46 
47  /**
48  * @brief Returns port with shapes for the layer
49  * @return Port with shapes
50  */
51  const Port& getPort() const;
52  /**
53  * @brief Sets port shapes for the layer
54  * @param port Port with shapes
55  * @return reference to layer builder
56  */
57  LRNLayer& setPort(const Port& port);
58  /**
59  * @brief Returns side length of the region
60  * @return Size
61  */
62  size_t getSize() const;
63  /**
64  * @brief Sets side length of the region
65  * @param size Size
66  * @return reference to layer builder
67  */
68  LRNLayer& setSize(size_t size);
69  /**
70  * @brief Returns scaling parameter for the normalizing sum
71  * @return Scaling parameter
72  */
73  float getAlpha() const;
74  /**
75  * @brief Sets scaling parameter for the normalizing sum
76  * @param alpha Scaling parameter
77  * @return reference to layer builder
78  */
79  LRNLayer& setAlpha(float alpha);
80  /**
81  * @brief Returns exponent for the normalizing sum
82  * @return Exponent
83  */
84  float getBeta() const;
85  /**
86  * @brief Sets exponent for the normalizing sum
87  * @param beta Exponent
88  * @return reference to layer builder
89  */
90  LRNLayer& setBeta(float beta);
91  /**
92  * @brief Returns region type
93  * @return true if normalizing sum is performed over adjacent channels
94  */
95  float getBias() const;
96  /**
97  * @brief Sets bias for the normalizing sum
98  * @param bias Bias
99  * @return reference to layer builder
100  */
101  LRNLayer& setBias(float bias);
102 };
103 IE_SUPPRESS_DEPRECATED_END
104 
105 } // namespace Builder
106 } // 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
This class defines the basic functional for layer builders.
Definition: ie_layer_decorator.hpp:26
float bias
Bias for squares sum.
Definition: ie_layers.h:853
std::shared_ptr< Layer > Ptr
A shared pointer to the Layer builder.
Definition: ie_layer_builder.hpp:48
The class represents a builder for LRN layer.
Definition: ie_lrn_layer.hpp:23
float alpha
A scale factor of src1 matrix.
Definition: ie_layers.h:1456
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
float beta
A scale factor of src3 matrix.
Definition: ie_layers.h:1460