From aaba09ba550099798aa7b441894e27500c7d7a85 Mon Sep 17 00:00:00 2001 From: Satya Jandhyala Date: Fri, 29 Dec 2023 13:46:43 -0800 Subject: [PATCH] Use opset value instead of inferring based on the number of number inputs because for Resize opset 13 and above the number of inputs is 1 to 4. --- onnxruntime/core/providers/cpu/tensor/upsamplebase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/providers/cpu/tensor/upsamplebase.h b/onnxruntime/core/providers/cpu/tensor/upsamplebase.h index a0e7ca1084fef..749b03cb0585a 100644 --- a/onnxruntime/core/providers/cpu/tensor/upsamplebase.h +++ b/onnxruntime/core/providers/cpu/tensor/upsamplebase.h @@ -76,7 +76,7 @@ class UpsampleBase { } auto input_count = info.GetInputCount(); - if (input_count == 1) { // opset < 10 + if (opset < 10) { ORT_THROW_IF_ERROR(info.GetAttrs("scales", scales_)); ORT_THROW_IF_ERROR(ScalesValidation(scales_, mode_)); scales_cached_ = true;