Remove warning in batch_norm_op (#19260)

padding_in_crf
qingqing01 6 years ago committed by GitHub
parent d08d5ab519
commit 5fc8de449a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -245,8 +245,8 @@ class BatchNormKernel<platform::CPUDeviceContext, T>
variance_out->mutable_data<T>(ctx.GetPlace()), C);
if ((N * sample_size) == 1) {
LOG(WARNING) << "Only 1 element in normalization dimension, "
<< "we skip the batch norm calculation, let y = x.";
// Only 1 element in normalization dimension,
// we skip the batch norm calculation, let y = x.
framework::TensorCopy(*x, ctx.GetPlace(), y);
return;
}

@ -152,8 +152,8 @@ class BatchNormKernel<platform::CUDADeviceContext, T>
functor(dev_ctx, saved_variance, static_cast<BatchNormParamType<T>>(0));
if ((N * H * W * D) == 1) {
LOG(WARNING) << "Only 1 element in normalization dimension, "
<< "we skip the batch norm calculation, let y = x.";
// Only 1 element in normalization dimension,
// skip the batch norm calculation, let y = x.
framework::TensorCopy(*x, ctx.GetPlace(), y);
} else {
double this_factor = 1. - momentum;

Loading…
Cancel
Save