diff options
Diffstat (limited to 'src/backends/aclCommon/ArmComputeUtils.hpp')
-rw-r--r-- | src/backends/aclCommon/ArmComputeUtils.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backends/aclCommon/ArmComputeUtils.hpp b/src/backends/aclCommon/ArmComputeUtils.hpp index 0f56160051..4d690901c6 100644 --- a/src/backends/aclCommon/ArmComputeUtils.hpp +++ b/src/backends/aclCommon/ArmComputeUtils.hpp @@ -135,9 +135,15 @@ inline arm_compute::InterpolationPolicy ConvertResizeMethodToAclInterpolationPol } } -inline unsigned int ComputeSoftmaxAclAxis(const armnn::TensorInfo& tensor) +inline unsigned int ComputeSoftmaxAclAxis(const SoftmaxDescriptor& softmaxDesc, const armnn::TensorInfo& tensor) { - unsigned int dim = tensor.GetNumDimensions(); + // Detect the Android default value of -1 and return the ACL default value of 1. + if (softmaxDesc.m_Axis == -1) + { + return 1; + } + + unsigned int dim = tensor.GetNumDimensions(); BOOST_ASSERT(dim != 0); |