aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2020-04-29 13:37:09 +0100
committerMichele Di Giorgio <michele.digiorgio@arm.com>2020-05-01 08:52:33 +0000
commitc6aef871851691eb726e53f621d51545715896e3 (patch)
treee7128a7c63fffc62d2ceeac991e5fbcaacf5ea46
parentbc0e1c969261f4ba65451dc5fe29acfb80671f68 (diff)
downloadComputeLibrary-c6aef871851691eb726e53f621d51545715896e3.tar.gz
COMPMID-3069: Validate bias dimensionality in NEFullyConnectedLayer
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: Ib5add7951417806f89ce9445f8cdd723488193c3 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3119 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--src/runtime/NEON/functions/NEFullyConnectedLayer.cpp3
1 files changed, 2 insertions, 1 deletions
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