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  * @brief The class represents a builder for Normalize layer
16  */
17 class INFERENCE_ENGINE_API_CLASS(NormalizeLayer): public LayerDecorator {
18 public:
19  /**
20  * @brief The constructor creates a builder with the name
21  * @param name Layer name
22  */
23  explicit NormalizeLayer(const std::string& name = "");
24  /**
25  * @brief The constructor creates a builder from generic builder
26  * @param layer pointer to generic builder
27  */
28  explicit NormalizeLayer(const Layer::Ptr& layer);
29  /**
30  * @brief The constructor creates a builder from generic builder
31  * @param layer constant pointer to generic builder
32  */
33  explicit NormalizeLayer(const Layer::CPtr& layer);
34  /**
35  * @brief Sets the name for the layer
36  * @param name Layer name
37  * @return reference to layer builder
38  */
39  NormalizeLayer& setName(const std::string& name);
40 
41  /**
42  * @brief Returns port with shapes for the layer
43  * @return Port with shapes
44  */
45  const Port& getPort() const;
46  /**
47  * @brief Sets port shapes for the layer
48  * @param port Port with shapes
49  * @return reference to layer builder
50  */
51  NormalizeLayer& setPort(const Port& port);
52 
53  /**
54  * @brief Returns channel shared flag
55  * @return true if scale parameters are shared across channels
56  */
57  bool getChannelShared() const;
58  /**
59  * @brief Sets channel shared flag
60  * @param acrossMap true if scale parameters are shared across channels
61  * @return reference to layer builder
62  */
63  NormalizeLayer& setChannelShared(bool acrossMap);
64  /**
65  * @brief Returns across maps
66  * @return true if normalization is shared across channels
67  */
68  bool getAcrossMaps() const;
69  /**
70  * @brief Sets across map
71  * @param acrossMap true if normalization is shared across channels
72  * @return reference to layer builder
73  */
74  NormalizeLayer& setAcrossMaps(bool acrossMap);
75 
76  /**
77  * @brief Returns epsilon
78  * @return Epsilon
79  */
80  float getEpsilon() const;
81  /**
82  * @brief Sets epsilon
83  * @param eps Epsilon
84  * @return reference to layer builder
85  */
86  NormalizeLayer& setEpsilon(float eps);
87 };
88 
89 } // namespace Builder
90 } // namespace InferenceEngine
Definition: ie_argmax_layer.hpp:11