aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers/FloorLayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/layers/FloorLayer.cpp')
-rw-r--r--src/armnn/layers/FloorLayer.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/armnn/layers/FloorLayer.cpp b/src/armnn/layers/FloorLayer.cpp
index 9e46ebf5c2..04d847ee10 100644
--- a/src/armnn/layers/FloorLayer.cpp
+++ b/src/armnn/layers/FloorLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "FloorLayer.hpp"
@@ -31,18 +31,16 @@ FloorLayer* FloorLayer::Clone(Graph& graph) const
void FloorLayer::ValidateTensorShapesFromInputs(ShapeInferenceMethod shapeInferenceMethod)
{
- IgnoreUnused(shapeInferenceMethod);
-
VerifyLayerConnections(1, CHECK_LOCATION());
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+ const TensorShape& outputShape = GetOutputSlot(0).GetTensorInfo().GetShape();
+ VerifyShapeInferenceType(outputShape, shapeInferenceMethod);
+
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
ARMNN_ASSERT(inferredShapes.size() == 1);
- ConditionalThrowIfNotEqual<LayerValidationException>(
- "FloorLayer: TensorShape set on OutputSlot[0] does not match the inferred shape.",
- GetOutputSlot(0).GetTensorInfo().GetShape(),
- inferredShapes[0]);
+ ValidateAndCopyShape(outputShape, inferredShapes[0], shapeInferenceMethod, "FloorLayer");
}
void FloorLayer::Accept(ILayerVisitor& visitor) const