diff --git a/mindspore/ccsrc/utils/log_adapter.cc b/mindspore/ccsrc/utils/log_adapter.cc index 19482ec193..eed68cf859 100644 --- a/mindspore/ccsrc/utils/log_adapter.cc +++ b/mindspore/ccsrc/utils/log_adapter.cc @@ -96,6 +96,13 @@ static int GetGlogLevel(MsLogLevel level) { } } #else + +#undef Dlog +#define Dlog(module_id, level, format, ...) \ + do { \ + DlogInner((module_id), (level), (format), ##__VA_ARGS__); \ + } while (0) + // convert MsLogLevel to corresponding slog level static int GetSlogLevel(MsLogLevel level) { switch (level) { diff --git a/mindspore/nn/layer/normalization.py b/mindspore/nn/layer/normalization.py index d5082371c1..2df064353f 100644 --- a/mindspore/nn/layer/normalization.py +++ b/mindspore/nn/layer/normalization.py @@ -136,6 +136,7 @@ class BatchNorm1d(_BatchNorm): eps (float): A value added to the denominator for numerical stability. Default: 1e-5. momentum (float): A floating hyperparameter of the momentum for the running_mean and running_var computation. Default: 0.9. + affine (bool): A bool value when set to True, gamma and beta can be learnable. Default: True. gamma_init (Union[Tensor, str, Initializer, numbers.Number]): Initializer for the gamma weight. The values of str refer to the function `initializer` including 'zeros', 'ones', 'xavier_uniform', 'he_uniform', etc. Default: 'ones'. @@ -187,6 +188,7 @@ class BatchNorm2d(_BatchNorm): eps (float): A value added to the denominator for numerical stability. Default: 1e-5. momentum (float): A floating hyperparameter of the momentum for the running_mean and running_var computation. Default: 0.9. + affine (bool): A bool value when set to True, gamma and beta can be learnable. Default: True. gamma_init (Union[Tensor, str, Initializer, numbers.Number]): Initializer for the gamma weight. The values of str refer to the function `initializer` including 'zeros', 'ones', 'xavier_uniform', 'he_uniform', etc. Default: 'ones'.