Publishing R5 content (#72)
[platform/upstream/dldt.git] / inference-engine / include / builders / ie_mvn_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 MVN layer
16  */
17 class INFERENCE_ENGINE_API_CLASS(MVNLayer): public LayerFragment {
18 public:
19     /**
20      * @brief The constructor creates a builder with the name
21      * @param name Layer name
22      */
23     explicit MVNLayer(const std::string& name = "");
24     /**
25      * @brief The constructor creates a builder from generic builder
26      * @param genLayer generic builder
27      */
28     explicit MVNLayer(Layer& genLayer);
29     /**
30      * @brief Sets the name for the layer
31      * @param name Layer name
32      * @return reference to layer builder
33      */
34     MVNLayer& 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     MVNLayer& setPort(const Port& port);
47     /**
48      * @brief Returns across channels value
49      * @return true if mean values are shared across channels
50      */
51     bool getAcrossChannels() const;
52     /**
53      * @brief Sets across channels
54      * @param flag true if mean values are shared across channels
55      * @return reference to layer builder
56      */
57     MVNLayer& setAcrossChannels(bool flag);
58     /**
59      * @brief Returns normalize variance
60      * @return true if variance normalization is performed
61      */
62     bool getNormalize() const;
63     /**
64      * @brief Sets normalize variance
65      * @param flag true if variance normalization is performed
66      * @return reference to layer builder
67      */
68     MVNLayer& setNormalize(bool flag);
69     /**
70      * @brief Return epsilon
71      * @return Epsilon
72      */
73     float getEpsilon() const;
74     /**
75      * @brief Sets epsilon
76      * @param eps Epsilon
77      * @return reference to layer builder
78      */
79     MVNLayer& setEpsilon(float eps);
80 };
81
82 }  // namespace Builder
83 }  // namespace InferenceEngine