aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/layers')
-rw-r--r--src/armnn/layers/Convolution2dLayer.cpp3
-rw-r--r--src/armnn/layers/DepthwiseConvolution2dLayer.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/armnn/layers/Convolution2dLayer.cpp b/src/armnn/layers/Convolution2dLayer.cpp
index 26f11f3d0c..18557bf64e 100644
--- a/src/armnn/layers/Convolution2dLayer.cpp
+++ b/src/armnn/layers/Convolution2dLayer.cpp
@@ -89,6 +89,9 @@ std::vector<TensorShape> Convolution2dLayer::InferOutputShapes(const std::vector
// If we support multiple batch dimensions in the future, then this assert will need to change.
ARMNN_ASSERT_MSG(inputShape.GetNumDimensions() == 4, "Convolutions will always have 4D input.");
+ ARMNN_ASSERT( m_Param.m_StrideX > 0);
+ ARMNN_ASSERT( m_Param.m_StrideY > 0);
+
DataLayoutIndexed dataLayoutIndex(m_Param.m_DataLayout);
unsigned int inWidth = inputShape[dataLayoutIndex.GetWidthIndex()];
diff --git a/src/armnn/layers/DepthwiseConvolution2dLayer.cpp b/src/armnn/layers/DepthwiseConvolution2dLayer.cpp
index 139d268631..ff9cebafd5 100644
--- a/src/armnn/layers/DepthwiseConvolution2dLayer.cpp
+++ b/src/armnn/layers/DepthwiseConvolution2dLayer.cpp
@@ -90,6 +90,9 @@ DepthwiseConvolution2dLayer::InferOutputShapes(const std::vector<TensorShape>& i
ARMNN_ASSERT_MSG(inputShape.GetNumDimensions() == 4, "Convolutions will always have 4D input.");
+ ARMNN_ASSERT( m_Param.m_StrideX > 0);
+ ARMNN_ASSERT( m_Param.m_StrideY > 0);
+
DataLayoutIndexed dataLayoutIndex(m_Param.m_DataLayout);
unsigned int inputBatchSize = inputShape[0];