X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=documentation%2F_n_e_batch_normalization_layer_kernel_8h_source.xhtml;h=b832ff1f4caef9c5116cdeea154d7830e9fa56cc;hb=06ea048f062a50404b1b3998a61a45449c2d1f0f;hp=16d03f747118f0cf67c33ebb4d2d968348f2c583;hpb=bf8b01dfbfdca124673ade33c5eac8f3748d7abd;p=platform%2Fupstream%2Farmcl.git diff --git a/documentation/_n_e_batch_normalization_layer_kernel_8h_source.xhtml b/documentation/_n_e_batch_normalization_layer_kernel_8h_source.xhtml index 16d03f7..b832ff1 100644 --- a/documentation/_n_e_batch_normalization_layer_kernel_8h_source.xhtml +++ b/documentation/_n_e_batch_normalization_layer_kernel_8h_source.xhtml @@ -4,7 +4,7 @@ - + Compute Library: arm_compute/core/NEON/kernels/NEBatchNormalizationLayerKernel.h Source File @@ -12,22 +12,24 @@ + + + @@ -38,7 +40,7 @@
Compute Library -  17.10 +  18.02
@@ -46,7 +48,7 @@ - + @@ -101,7 +103,7 @@ $(document).ready(function(){initNavTree('_n_e_batch_normalization_layer_kernel_ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages +
@@ -115,87 +117,35 @@ $(document).ready(function(){initNavTree('_n_e_batch_normalization_layer_kernel_
NEBatchNormalizationLayerKernel.h
-Go to the documentation of this file.
1 /*
-
2  * Copyright (c) 2017 ARM Limited.
-
3  *
-
4  * SPDX-License-Identifier: MIT
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to
-
8  * deal in the Software without restriction, including without limitation the
-
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-
10  * sell copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef __ARM_COMPUTE_NEBATCHNORMALIZATIONLAYERKERNEL_H__
-
25 #define __ARM_COMPUTE_NEBATCHNORMALIZATIONLAYERKERNEL_H__
-
26 
- -
28 
-
29 namespace arm_compute
-
30 {
-
31 class ITensor;
-
32 
- -
36 {
-
37 public:
- - - - - - -
64  void configure(ITensor *input, ITensor *output, const ITensor *mean, const ITensor *var, const ITensor *beta, const ITensor *gamma, float epsilon);
-
65 
-
66  // Inherited methods overridden:
-
67  void run(const Window &window, const ThreadInfo &info) override;
-
68 
-
69 private:
-
70  using BatchNormFunction = void(ITensor *input, ITensor *output, const ITensor *mean, const ITensor *var, const ITensor *beta, const ITensor *gamma, float epsilon, const Window &window);
-
71  BatchNormFunction *_func;
-
72  ITensor *_input;
-
73  ITensor *_output;
-
74  const ITensor *_mean;
-
75  const ITensor *_var;
-
76  const ITensor *_gamma;
-
77  const ITensor *_beta;
-
78  float _epsilon;
-
79 };
-
80 } // namespace arm_compute
-
81 #endif /*__ARM_COMPUTE_NEBATCHNORMALIZATIONLAYERKERNEL_H__ */
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2018 ARM Limited.
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #ifndef __ARM_COMPUTE_NEBATCHNORMALIZATIONLAYERKERNEL_H__
25 #define __ARM_COMPUTE_NEBATCHNORMALIZATIONLAYERKERNEL_H__
26 
28 
29 namespace arm_compute
30 {
31 class ITensor;
32 
36 {
37 public:
38  const char *name() const override
39  {
40  return "NEBatchNormalizationLayerKernel";
41  }
70  void configure(ITensor *input, ITensor *output, const ITensor *mean, const ITensor *var, const ITensor *beta, const ITensor *gamma, float epsilon,
88  static Status validate(const ITensorInfo *input, const ITensorInfo *output,
89  const ITensorInfo *mean, const ITensorInfo *var,
90  const ITensorInfo *beta, const ITensorInfo *gamma,
91  float epsilon, ActivationLayerInfo act_info);
92 
93  // Inherited methods overridden:
94  void run(const Window &window, const ThreadInfo &info) override;
95 
96 private:
98  void configure_non_fused();
100  void configure_fused();
107  template <bool fused_activation>
108  void batch_normalization_qs8(const Window &window);
115  template <bool fused_activation>
116  void batch_normalization_qs16(const Window &window);
123  template <bool fused_activation>
124  void batch_normalization_fp16(const Window &window);
132  template <bool fused_activation, typename F>
133  void batch_normalization_fp32(const Window &window);
138  using BatchNormFunctionPtr = void (NEBatchNormalizationLayerKernel::*)(const Window &window);
139 
140 private:
141  BatchNormFunctionPtr _func;
142  ITensor *_input;
143  ITensor *_output;
144  const ITensor *_mean;
145  const ITensor *_var;
146  const ITensor *_gamma;
147  const ITensor *_beta;
148  float _epsilon;
149  ActivationLayerInfo _act_info;
150 };
151 } // namespace arm_compute
152 #endif /*__ARM_COMPUTE_NEBATCHNORMALIZATIONLAYERKERNEL_H__ */
const char * name() const override
Name of the kernel.
+
void configure(ITensor *input, ITensor *output, const ITensor *mean, const ITensor *var, const ITensor *beta, const ITensor *gamma, float epsilon, ActivationLayerInfo act_info=ActivationLayerInfo())
Set the input and output tensors.
+
Common interface for all kernels implemented in C++.
Definition: ICPPKernel.h:35
+
Store the tensor&#39;s metadata.
Definition: ITensorInfo.h:40
+
Status class.
Definition: Error.h:39
+
Activation Layer Information class.
Definition: Types.h:701
Interface for NEON tensor.
Definition: ITensor.h:36
src info() -> set_format(Format::S16)
+
This file contains all available output stages for GEMMLowp on OpenCL.
Definition: 01_library.dox:1
NEBatchNormalizationLayerKernel()
Default constructor.
void run(const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.
NEBatchNormalizationLayerKernel & operator=(const NEBatchNormalizationLayerKernel &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
Interface for the batch normalization layer kernel.
+
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *mean, const ITensorInfo *var, const ITensorInfo *beta, const ITensorInfo *gamma, float epsilon, ActivationLayerInfo act_info)
Static function to check if given info will lead to a valid configuration of NEBatchNormalizationLaye...
~NEBatchNormalizationLayerKernel()=default
Default destructor.
const Window & window() const
The maximum window the kernel can be executed on.
-
void configure(ITensor *input, ITensor *output, const ITensor *mean, const ITensor *var, const ITensor *beta, const ITensor *gamma, float epsilon)
Set the input and output tensors.
Describe a multidimensional execution window.
Definition: Window.h:39