diff --git a/onnxruntime/core/providers/cpu/tensor/upsample.h b/onnxruntime/core/providers/cpu/tensor/upsample.h index 54c6132bee..303760d57a 100644 --- a/onnxruntime/core/providers/cpu/tensor/upsample.h +++ b/onnxruntime/core/providers/cpu/tensor/upsample.h @@ -18,6 +18,10 @@ enum UpsampleMode { class UpsampleBase { protected: UpsampleBase(OpKernelInfo info) : scales_cached_(false) { + int start, end; + info.GetKernelDef().SinceVersion(&start, &end); + is_resize = (start == 10); + std::string mode; ORT_ENFORCE(info.GetAttr("mode", &mode).IsOK()); mode_ = StringToUpsampleMode(mode); @@ -28,7 +32,6 @@ class UpsampleBase { ScalesValidation(scales_, mode_); } - // opset 9 if (input_count > 1) { const Tensor* scale; bool get_scale = info.TryGetConstantInput(1, &scale); diff --git a/onnxruntime/test/python/onnx_backend_test_series.py b/onnxruntime/test/python/onnx_backend_test_series.py index 9cabd5ca14..741f3f7e6a 100644 --- a/onnxruntime/test/python/onnx_backend_test_series.py +++ b/onnxruntime/test/python/onnx_backend_test_series.py @@ -84,12 +84,7 @@ backend_test.exclude(r'(' '|^test_zfnet512_cpu.*' '|^test_gru_seq_length_cpu.*' '|^test_mvn_cpu.*' -'|^test_resize_downsample_linear_cpu.*' -'|^test_resize_downsample_nearest_cpu.*' -'|^test_resize_nearest_cpu.*' -'|^test_resize_upsample_linear_cpu.*' -'|^test_resize_upsample_nearest_cpu.*' -'|^test_mod_float_mixed_sign_example*' +'|^test_mod_float_mixed_sign_example.*' '|^test_reversesequence_batch_cpu.*' '|^test_reversesequence_time_cpu.*' '|^test_roialign_cpu.*'