From 377ad670b24eaebe8ebf8a619485745ea147fa74 Mon Sep 17 00:00:00 2001 From: Naren Dasan Date: Fri, 27 Mar 2020 20:28:54 -0700 Subject: [PATCH] fix(//core/conversion/converters/impl/linear): In inserting flatten for layers other than conv, did not remove batch size from tensor shape Signed-off-by: Naren Dasan Signed-off-by: Naren Dasan --- core/conversion/converters/impl/linear.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/conversion/converters/impl/linear.cpp b/core/conversion/converters/impl/linear.cpp index fbbe9e5473..0b5b4e957a 100644 --- a/core/conversion/converters/impl/linear.cpp +++ b/core/conversion/converters/impl/linear.cpp @@ -27,7 +27,7 @@ auto linear_registrations = RegisterNodeConversionPatterns() new_shape.push_back(shape[0]); new_shape.push_back(1); new_shape.push_back(1); - new_shape.push_back(util::volume(util::toDims(shape))); + new_shape.push_back(util::volume(util::toDims(shape)) / shape[0]); auto new_dims = util::toDims(new_shape); LOG_DEBUG("Input shape is less than 4D got: " << util::toDims(shape) << ", inserting shuffle layer to reshape to 4D tensor shape: " << new_dims);