From 04b3e0ef5eb7916f9806b89e3e5e41172ccd3dbb Mon Sep 17 00:00:00 2001 From: Hariharan Seshadri Date: Tue, 22 Dec 2020 13:35:31 +0530 Subject: [PATCH] Condition fix in Resize operator (#6193) --- onnxruntime/core/providers/cpu/tensor/upsample.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime/core/providers/cpu/tensor/upsample.h b/onnxruntime/core/providers/cpu/tensor/upsample.h index 875b09fbaa..a7b3a77214 100644 --- a/onnxruntime/core/providers/cpu/tensor/upsample.h +++ b/onnxruntime/core/providers/cpu/tensor/upsample.h @@ -69,8 +69,8 @@ class UpsampleBase { ? info.GetAttrOrDefault("coordinate_transformation_mode", "half_pixel") : "asymmetric"; coordinate_transform_mode_ = StringToCoordinateTransformationMode(coordinate_transform_mode_name); - if (opset >= 13) { - LOGS(onnxruntime::logging::LoggingManager::DefaultLogger(), WARNING) + if (opset >= 13 && coordinate_transform_mode_ == TF_HALF_PIXEL_FOR_NN) { + LOGS_DEFAULT(WARNING) << "`tf_half_pixel_for_nn` is deprecated since opset 13, " << "yet this opset " << opset << " model uses the deprecated attribute"; }