ie_normalize_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 Normalize layer
17  */
18 IE_SUPPRESS_DEPRECATED_START
19 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(NormalizeLayer): public LayerDecorator {
20 public:
21  /**
22  * @brief The constructor creates a builder with the name
23  * @param name Layer name
24  */
25  explicit NormalizeLayer(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 NormalizeLayer(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 NormalizeLayer(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  NormalizeLayer& 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  NormalizeLayer& setPort(const Port& port);
54 
55  /**
56  * @brief Returns channel shared flag
57  * @return true if scale parameters are shared across channels
58  */
59  bool getChannelShared() const;
60  /**
61  * @brief Sets channel shared flag
62  * @param acrossMap true if scale parameters are shared across channels
63  * @return reference to layer builder
64  */
65  NormalizeLayer& setChannelShared(bool acrossMap);
66  /**
67  * @brief Returns across maps
68  * @return true if normalization is shared across channels
69  */
70  bool getAcrossMaps() const;
71  /**
72  * @brief Sets across map
73  * @param acrossMap true if normalization is shared across channels
74  * @return reference to layer builder
75  */
76  NormalizeLayer& setAcrossMaps(bool acrossMap);
77 
78  /**
79  * @brief Returns epsilon
80  * @return Epsilon
81  */
82  float getEpsilon() const;
83  /**
84  * @brief Sets epsilon
85  * @param eps Epsilon
86  * @return reference to layer builder
87  */
88  NormalizeLayer& setEpsilon(float eps);
89 };
90 IE_SUPPRESS_DEPRECATED_END
91 
92 } // namespace Builder
93 } // namespace InferenceEngine
Inference Engine API.
Definition: ie_argmax_layer.hpp:11