From 245b9864e547d127edf07f726d670bb5831068f7 Mon Sep 17 00:00:00 2001 From: Pranshu-S Date: Sat, 23 Mar 2024 23:47:57 +0530 Subject: [PATCH] Fix logic for NCHW --- src/frontends/tensorflow_common/src/op/bias_add.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/frontends/tensorflow_common/src/op/bias_add.cpp b/src/frontends/tensorflow_common/src/op/bias_add.cpp index d0a2fd95571d66..6c7c17a8b95cbc 100644 --- a/src/frontends/tensorflow_common/src/op/bias_add.cpp +++ b/src/frontends/tensorflow_common/src/op/bias_add.cpp @@ -47,14 +47,11 @@ OutputVector translate_bias_add_op(const NodeContext& node) { TENSORFLOW_OP_VALIDATION(node, value_shape.rank().is_static(), "Value of dynamic rank for BiasAdd in NCHW layout is not supported."); - auto value_rank = complex_type_inputs ? value_shape.rank().get_length() : value_shape.rank().get_length(); + auto value_rank = complex_type_inputs ? value_shape.rank().get_length() - 1 : value_shape.rank().get_length(); std::vector axes_unsqueeze; for (int64_t dim_ind = 0; dim_ind < value_rank; ++dim_ind) { - if (!complex_type_inputs && dim_ind != 1) { - axes_unsqueeze.push_back(dim_ind); - } - if (complex_type_inputs && dim_ind != 2){ + if (dim_ind != 1) { axes_unsqueeze.push_back(dim_ind); } }