aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers/BatchToSpaceNdLayer.cpp
diff options
context:
space:
mode:
authorNarumol Prangnawarat <narumol.prangnawarat@arm.com>2020-04-01 16:51:23 +0100
committerNarumol Prangnawarat <narumol.prangnawarat@arm.com>2020-04-06 09:06:01 +0100
commitac2770a4bb6461bfbddec928bb6208f26f898f02 (patch)
treec72f67f648b7aca2f4bccf69b05d185bf5f9ccad /src/armnn/layers/BatchToSpaceNdLayer.cpp
parent7ee5d2c3b3cee5a924ed6347fef613ee07b5aca7 (diff)
downloadarmnn-ac2770a4bb6461bfbddec928bb6208f26f898f02.tar.gz
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 <narumol.prangnawarat@arm.com> Change-Id: I5d0fa3a37b7c1c921216de68f0073aa34702c9ff
Diffstat (limited to 'src/armnn/layers/BatchToSpaceNdLayer.cpp')
-rw-r--r--src/armnn/layers/BatchToSpaceNdLayer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/armnn/layers/BatchToSpaceNdLayer.cpp b/src/armnn/layers/BatchToSpaceNdLayer.cpp
index 7e7045291c..1da88c63ac 100644
--- a/src/armnn/layers/BatchToSpaceNdLayer.cpp
+++ b/src/armnn/layers/BatchToSpaceNdLayer.cpp
@@ -47,7 +47,7 @@ void BatchToSpaceNdLayer::ValidateTensorShapesFromInputs()
auto inferredShapes = InferOutputShapes({GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape()});
- BOOST_ASSERT(inferredShapes.size() == 1);
+ ARMNN_ASSERT(inferredShapes.size() == 1);
ConditionalThrowIfNotEqual<LayerValidationException>(
"BatchToSpaceLayer: TensorShape set on OutputSlot[0] does not match the inferred shape.",
@@ -56,7 +56,7 @@ void BatchToSpaceNdLayer::ValidateTensorShapesFromInputs()
std::vector<TensorShape> BatchToSpaceNdLayer::InferOutputShapes(const std::vector<TensorShape>& inputShapes) const
{
- BOOST_ASSERT(inputShapes.size() == 1);
+ ARMNN_ASSERT(inputShapes.size() == 1);
const TensorShape& inputShape = inputShapes[0];
TensorShape outputShape(inputShape);
@@ -66,7 +66,7 @@ std::vector<TensorShape> BatchToSpaceNdLayer::InferOutputShapes(const std::vecto
1U,
std::multiplies<>());
- BOOST_ASSERT(inputShape[0] % accumulatedBlockShape == 0);
+ ARMNN_ASSERT(inputShape[0] % accumulatedBlockShape == 0);
outputShape[0] = inputShape[0] / accumulatedBlockShape;
@@ -80,10 +80,10 @@ std::vector<TensorShape> BatchToSpaceNdLayer::InferOutputShapes(const std::vecto
unsigned int outputHeight = inputShape[heightIndex] * m_Param.m_BlockShape[0];
unsigned int outputWidth = inputShape[widthIndex] * m_Param.m_BlockShape[1];
- BOOST_ASSERT_MSG(heightCrop <= outputHeight,
+ ARMNN_ASSERT_MSG(heightCrop <= outputHeight,
"BatchToSpaceLayer: Overall height crop should be less than or equal to the uncropped output height.");
- BOOST_ASSERT_MSG(widthCrop <= outputWidth,
+ ARMNN_ASSERT_MSG(widthCrop <= outputWidth,
"BatchToSpaceLayer: Overall width crop should be less than or equal to the uncropped output width.");
outputShape[heightIndex] = outputHeight - heightCrop;