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.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/armnn/layers/FloorLayer.cpp b/src/armnn/layers/FloorLayer.cpp
index a9ddcca60c..e88600b354 100644
--- a/src/armnn/layers/FloorLayer.cpp
+++ b/src/armnn/layers/FloorLayer.cpp
@@ -32,18 +32,16 @@ FloorLayer* FloorLayer::Clone(Graph& graph) const
void FloorLayer::ValidateTensorShapesFromInputs()
{
- ConditionalThrow<LayerValidationException>(GetInputSlot(0).GetConnection() != nullptr,
- "FloorLayer: InputSlot must be connected to an OutputSlot");
- ConditionalThrow<LayerValidationException>(GetInputSlot(0).GetConnection()->IsTensorInfoSet(),
- "FloorLayer: TensorInfo must be set on connected OutputSlot.");
-
- // input and output shapes are the same
- IOutputSlot* input = GetInputSlot(0).GetConnection();
- TensorShape const& outShape = input->GetTensorInfo().GetShape();
+ VerifyLayerConnections(1, CHECK_LOCATION());
+
+ auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
+
+ BOOST_ASSERT(inferredShapes.size() == 1);
+
ConditionalThrowIfNotEqual<LayerValidationException>(
"FloorLayer: TensorShape set on OutputSlot[0] does not match the inferred shape.",
GetOutputSlot(0).GetTensorInfo().GetShape(),
- outShape);
+ inferredShapes[0]);
}
} // namespace armnn