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