From c6aef871851691eb726e53f621d51545715896e3 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 29 Apr 2020 13:37:09 +0100 Subject: COMPMID-3069: Validate bias dimensionality in NEFullyConnectedLayer Signed-off-by: Georgios Pinitas Change-Id: Ib5add7951417806f89ce9445f8cdd723488193c3 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3119 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- src/runtime/NEON/functions/NEFullyConnectedLayer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/NEON/functions/NEFullyConnectedLayer.cpp b/src/runtime/NEON/functions/NEFullyConnectedLayer.cpp index 6e398ac1d1..e275bca2f9 100644 --- a/src/runtime/NEON/functions/NEFullyConnectedLayer.cpp +++ b/src/runtime/NEON/functions/NEFullyConnectedLayer.cpp @@ -318,6 +318,7 @@ Status NEFullyConnectedLayer::validate(const ITensorInfo *input, const ITensorIn ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::QASYMM8_SIGNED, DataType::F16, DataType::F32); ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights, output); ARM_COMPUTE_RETURN_ERROR_ON(weights->num_dimensions() > 2); + ARM_COMPUTE_RETURN_ERROR_ON(biases != nullptr && biases->num_dimensions() > 1); bool weights_reshaped = fc_info.transpose_weights ? fc_info.are_weights_reshaped : true; bool is_fc_after_conv = true; @@ -484,4 +485,4 @@ void NEFullyConnectedLayer::prepare() _is_prepared = true; } } -} // namespace arm_compute \ No newline at end of file +} // namespace arm_compute -- cgit v1.2.1