diff options
Diffstat (limited to 'src/armnn/layers/FakeQuantizationLayer.cpp')
-rw-r--r-- | src/armnn/layers/FakeQuantizationLayer.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/armnn/layers/FakeQuantizationLayer.cpp b/src/armnn/layers/FakeQuantizationLayer.cpp index 24b53b2e37..7bda1c1f78 100644 --- a/src/armnn/layers/FakeQuantizationLayer.cpp +++ b/src/armnn/layers/FakeQuantizationLayer.cpp @@ -32,20 +32,16 @@ FakeQuantizationLayer* FakeQuantizationLayer::Clone(Graph& graph) const void FakeQuantizationLayer::ValidateTensorShapesFromInputs() { - ConditionalThrow<LayerValidationException>(GetInputSlot(0).GetConnection() != nullptr, - "FakeQuantizationLayer: InputSlot must be connected to an OutputSlot"); - ConditionalThrow<LayerValidationException>(GetInputSlot(0).GetConnection()->IsTensorInfoSet(), - "FakeQuantizationLayer: TensorInfo must be set on connected OutputSlot."); + VerifyLayerConnections(1, CHECK_LOCATION()); + auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() }); - IOutputSlot* input = GetInputSlot(0).GetConnection(); + BOOST_ASSERT(inferredShapes.size() == 1); - // input and output shapes are the same - TensorShape const& outShape = input->GetTensorInfo().GetShape(); ConditionalThrowIfNotEqual<LayerValidationException>( "FakeQuantizationLayer: TensorShape set on OutputSlot[0] does not match the inferred shape.", GetOutputSlot(0).GetTensorInfo().GetShape(), - outShape); + inferredShapes[0]); } } // namespace armnn |