From efbf6c8fd54159b26eda43eea7a12fce491ca13a Mon Sep 17 00:00:00 2001 From: giuros01 Date: Mon, 3 Sep 2018 09:53:53 +0100 Subject: [COMPMID-386] Github: Support SoftmaxLayer on different number of dimensions? Change-Id: I7422b977538ff29930a90f078badc2edee78af93 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/146638 Tested-by: Jenkins Reviewed-by: Georgios Pinitas --- src/runtime/NEON/functions/NESoftmaxLayer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/runtime/NEON/functions/NESoftmaxLayer.cpp') diff --git a/src/runtime/NEON/functions/NESoftmaxLayer.cpp b/src/runtime/NEON/functions/NESoftmaxLayer.cpp index 3a73f1efeb..9be9e6817a 100644 --- a/src/runtime/NEON/functions/NESoftmaxLayer.cpp +++ b/src/runtime/NEON/functions/NESoftmaxLayer.cpp @@ -36,9 +36,10 @@ NESoftmaxLayer::NESoftmaxLayer(std::shared_ptr memory_manager) { } -void NESoftmaxLayer::configure(ITensor *input, ITensor *output, float beta) +void NESoftmaxLayer::configure(ITensor *input, ITensor *output, float beta, size_t axis) { ARM_COMPUTE_ERROR_ON_NULLPTR(input, output); + ARM_COMPUTE_UNUSED(axis); // Configure Kernels _max_kernel.configure(input, &_max); @@ -58,8 +59,10 @@ void NESoftmaxLayer::configure(ITensor *input, ITensor *output, float beta) _tmp.allocator()->allocate(); } -Status NESoftmaxLayer::validate(const ITensorInfo *input, const ITensorInfo *output, float beta) +Status NESoftmaxLayer::validate(const ITensorInfo *input, const ITensorInfo *output, float beta, size_t axis) { + ARM_COMPUTE_RETURN_ERROR_ON_MSG(axis != 1, "Axis must be 1 for NEON"); + // Perform validation step ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output); ARM_COMPUTE_RETURN_ERROR_ON_MSG(input->num_dimensions() > 2, "Only 2D inputs are supported"); -- cgit v1.2.1