From 47496db0bd56eef62343c3eae7fd6b4b3d9fdca1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9E=A5=EC=A7=80=EC=84=AD/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84?= =?utf8?q?=EC=9E=90?= Date: Fri, 13 Jul 2018 15:23:55 +0900 Subject: [PATCH] Change the rounding policy of MUL from TO_ZERO to TO_NEAREST_EVEN (#1940) This commit changes the rounding policy of MUL from TO_ZERO to TO_NEAREST_EVEN. If the rounding policy is TO_NEAREST_EVEN, it is most similar to the result of the TFLITE interpreter. Signed-off-by: jiseob.jang --- runtimes/pure_arm_compute/src/compilation.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtimes/pure_arm_compute/src/compilation.cc b/runtimes/pure_arm_compute/src/compilation.cc index 4ddd5cf..4b28821 100644 --- a/runtimes/pure_arm_compute/src/compilation.cc +++ b/runtimes/pure_arm_compute/src/compilation.cc @@ -588,7 +588,8 @@ void Planner::visit(const ::internal::tflite::op::Mul::Node &node) fn->configure(lhs_input_alloc, rhs_input_alloc, output_alloc, 1.0, // scale - arm_compute::ConvertPolicy::SATURATE, arm_compute::RoundingPolicy::TO_ZERO); + arm_compute::ConvertPolicy::SATURATE, + arm_compute::RoundingPolicy::TO_NEAREST_EVEN); builder.append("Mul", std::move(fn)); -- 2.7.4