aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers/ResizeLayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/layers/ResizeLayer.cpp')
-rw-r--r--src/armnn/layers/ResizeLayer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/armnn/layers/ResizeLayer.cpp b/src/armnn/layers/ResizeLayer.cpp
index 9654e58b43..b16adeb860 100644
--- a/src/armnn/layers/ResizeLayer.cpp
+++ b/src/armnn/layers/ResizeLayer.cpp
@@ -50,6 +50,11 @@ std::vector<TensorShape> ResizeLayer::InferOutputShapes(const std::vector<Tensor
TensorShape( { outBatch, outHeight, outWidth, outChannels } ) :
TensorShape( { outBatch, outChannels, outHeight, outWidth });
+ if (m_Param.m_HalfPixelCenters && m_Param.m_AlignCorners)
+ {
+ throw LayerValidationException("ResizeLayer: AlignCorners cannot be true when HalfPixelCenters is true");
+ }
+
return std::vector<TensorShape>({ tensorShape });
}