:nosearch: .. _op_ai_onnx_BatchNormalization-1: BatchNormalization - version 1 ============================== This page documents version **1** of operator **BatchNormalization**. See :doc:`BatchNormalization` for the latest version (since version 15). - **Domain**: ``ai.onnx`` - **Since version**: 1 Carries out batch normalization as described in the paper https://arxiv.org/abs/1502.03167. Depending on the mode it is being run, there are multiple cases for the number of outputs, which we list below: Output case #1: Y, mean, var, saved_mean, saved_var (training mode) Output case #2: Y (test mode) **Inputs** - **X** (*T*): The input 4-dimensional tensor of shape NCHW. - **scale** (*T*): The scale as a 1-dimensional tensor of size C to be applied to the output. - **B** (*T*): The bias as a 1-dimensional tensor of size C to be applied to the output. - **mean** (*T*): The running mean (training) or the estimated mean (testing) as a 1-dimensional tensor of size C. - **var** (*T*): The running variance (training) or the estimated variance (testing) as a 1-dimensional tensor of size C. **Outputs** - **Y** (*T*): The output 4-dimensional tensor of the same shape as X. - **mean** (*T*): The running mean after the BatchNormalization operator. Must be in-place with the input mean. Should not be used for testing. - **var** (*T*): The running variance after the BatchNormalization operator. Must be in-place with the input var. Should not be used for testing. - **saved_mean** (*T*): Saved mean used during training to speed up gradient computation. Should not be used for testing. - **saved_var** (*T*): Saved variance used during training to speed up gradient computation. Should not be used for testing. **Type Constraints** - **T**: Constrain input and output types to float tensors. Allowed types: tensor(double), tensor(float), tensor(float16).