From 259b4c15208a6d70ab742613b8f0e04b702a47ba Mon Sep 17 00:00:00 2001 From: vurusovs Date: Fri, 14 Apr 2023 12:49:16 +0400 Subject: [PATCH] #2 Fix broadcasting issue in FQ ref implementation --- .../include/ngraph/runtime/reference/fake_quantize.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/reference/include/ngraph/runtime/reference/fake_quantize.hpp b/src/core/reference/include/ngraph/runtime/reference/fake_quantize.hpp index 7982dc841d9184..4ba8ca1ae4c39c 100644 --- a/src/core/reference/include/ngraph/runtime/reference/fake_quantize.hpp +++ b/src/core/reference/include/ngraph/runtime/reference/fake_quantize.hpp @@ -23,9 +23,7 @@ inline std::vector calc_broadcast_index_offset(const std::vector const std::vector& broadcast_shape) { std::vector broadcast_offsets(broadcast_shape.size(), 0); for (int i = static_cast(broadcast_shape.size()) - 2; i >= 0; --i) { - if (broadcast_shape[i] == 1) { - broadcast_offsets[i] = memory_offsets[i]; - } + broadcast_offsets[i] = memory_offsets[i]; } const auto not_one = [](size_t i) { return i != 1;