Skip to content

Add `training_mode` for BatchNorm

For BatchNorm operator OPSET > 9, the attribute training_mode indicates if we want to output running mean and var.
For OPSET <= 9, this attributes doesn't exist and there are 4 additional output for any mode (inference or training):

  • mean: The updated running mean after this operation (used for inference).
  • var: The updated running variance after this operation.
  • saved_mean: The mean computed from the current batch (used for backprop).
  • saved_var: The variance from the current batch (used for backprop).
Edited by Houssem ROUIS