From ac2770a4bb6461bfbddec928bb6208f26f898f02 Mon Sep 17 00:00:00 2001 From: Narumol Prangnawarat Date: Wed, 1 Apr 2020 16:51:23 +0100 Subject: IVGCVSW-4485 Remove Boost assert * Change boost assert to armnn assert * Change include file to armnn assert * Fix ARMNN_ASSERT_MSG issue with multiple conditions * Change BOOST_ASSERT to BOOST_TEST where appropriate * Remove unused include statements Signed-off-by: Narumol Prangnawarat Change-Id: I5d0fa3a37b7c1c921216de68f0073aa34702c9ff --- src/armnn/layers/Pooling2dLayer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/armnn/layers/Pooling2dLayer.cpp') diff --git a/src/armnn/layers/Pooling2dLayer.cpp b/src/armnn/layers/Pooling2dLayer.cpp index a3c2425097..ad2c82f761 100644 --- a/src/armnn/layers/Pooling2dLayer.cpp +++ b/src/armnn/layers/Pooling2dLayer.cpp @@ -37,12 +37,12 @@ Pooling2dLayer* Pooling2dLayer::Clone(Graph& graph) const std::vector Pooling2dLayer::InferOutputShapes(const std::vector& inputShapes) const { - BOOST_ASSERT(inputShapes.size() == 1); + ARMNN_ASSERT(inputShapes.size() == 1); const TensorShape& inputShape = inputShapes[0]; const DataLayoutIndexed dimensionIndices = m_Param.m_DataLayout; // If we support multiple batch dimensions in the future, then this assert will need to change. - BOOST_ASSERT_MSG(inputShape.GetNumDimensions() == 4, "Pooling2dLayer will always have 4D input."); + ARMNN_ASSERT_MSG(inputShape.GetNumDimensions() == 4, "Pooling2dLayer will always have 4D input."); unsigned int inWidth = inputShape[dimensionIndices.GetWidthIndex()]; unsigned int inHeight = inputShape[dimensionIndices.GetHeightIndex()]; @@ -54,7 +54,7 @@ std::vector Pooling2dLayer::InferOutputShapes(const std::vector Pooling2dLayer::InferOutputShapes(const std::vector(floor(div)) + 1; break; default: - BOOST_ASSERT_MSG(false, "Unsupported Output Shape Rounding"); + ARMNN_ASSERT_MSG(false, "Unsupported Output Shape Rounding"); } // MakeS sure that border operations will start from inside the input and not the padded area. @@ -106,7 +106,7 @@ void Pooling2dLayer::ValidateTensorShapesFromInputs() auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() }); - BOOST_ASSERT(inferredShapes.size() == 1); + ARMNN_ASSERT(inferredShapes.size() == 1); ConditionalThrowIfNotEqual( "Pooling2dLayer: TensorShape set on OutputSlot[0] does not match the inferred shape.", -- cgit v1.2.1