2 // Copyright (c) 2016 Intel Corporation
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
17 ///////////////////////////////////////////////////////////////////////////////////////////////////
22 /// @addtogroup c_api C API
24 /// @addtogroup c_topology Network Topology
26 /// @addtogroup c_primitives Primitives
33 /// @brief Batch normalization primitive.
34 /// @details Performs batch normalization as described in
35 /// "Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift" by Ioffe, Szegedy
36 /// @n See: http://arxiv.org/abs/1502.03167
39 /// @n global stats can be computed as:
40 /// @n out[i] = ( (in[i] - mean[b]) / sqrt(variance[b] + epsilon) ) * scale[b] + shift[b]
42 CLDNN_BEGIN_PRIMITIVE_DESC(batch_norm)
43 /// @brief Primitive id containing mean data.
44 cldnn_primitive_id mean;
45 /// @brief Primitive id containing variance.
46 cldnn_primitive_id variance;
47 /// @brief Primitive id containing scale.
48 cldnn_primitive_id scale;
49 /// @brief Primitive id containing shift.
50 cldnn_primitive_id shift;
51 /// @brief Primitive id containing inverted variance used in future gradient computing.
52 cldnn_primitive_id inv_variance;
55 CLDNN_END_PRIMITIVE_DESC(batch_norm)
57 CLDNN_DECLARE_PRIMITIVE_TYPE_ID(batch_norm);
66 #endif /* BATCH_NORM_H */