From efad8bd1a9b73474e5a04e8e53bec34773ce38a6 Mon Sep 17 00:00:00 2001 From: "haizhu.shao" Date: Sat, 3 Sep 2022 15:57:22 +0000 Subject: [PATCH] [FIX] defaultly initialize RoiAlign's half_pixel_ attribute as true, to keep same semantics with ONNX Operators definiation. --- onnxruntime/core/providers/cpu/object_detection/roialign.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/providers/cpu/object_detection/roialign.h b/onnxruntime/core/providers/cpu/object_detection/roialign.h index 1bb8bd34c5..e1f37d226e 100644 --- a/onnxruntime/core/providers/cpu/object_detection/roialign.h +++ b/onnxruntime/core/providers/cpu/object_detection/roialign.h @@ -78,7 +78,7 @@ class RoiAlignBase { int64_t output_width_{1}; int64_t sampling_ratio_{0}; float spatial_scale_{1.0f}; - bool half_pixel_{false}; + bool half_pixel_{true}; private: ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE(RoiAlignBase);