Softmax output mismatch in v20.05
Hi,
I am seeing mismatch in output for a given input to softmax in image classification network. In version 20.02.1 we are seeing valid image classification results which is Bellpepper-946 but with v20.05 we are seeing all 1s.
I have attached standalone softmax setup for your reference. sfmx_Standalone.zip
I have even tried out with 20.05 prebuilt libraries but I am seeing same output mismatch
Thank you, Praveen.
Hello @uu-praveeng ,
@sanpar02 has been looking into Softmax lately thus he could assist in the matter
I am also seeing same issue with SoftMax layer.
It looks like some default parameter is changed on 20.05 (most likely axis). I see below difference in comment of SoftMax layer implementation. On 20.05: * @param[in] axis (Optional) Reduction axis. Defaults to -1. * Negative index is used to specify axis from the end (e.g. -1 for the last axis).Must be in range [-input_num_dimensions, input_num_dimensions). * It has the purpose of squashing the first @p axis dimensions together. For instance, given a [4x4x4x4] image, * when @p axis is 2, the Softmax reduction will be applied on each of the [4x4] planes of the input image.
On 20.02: * @param[in] axis (Optional) Reduction axis. Defaults to 1. Must be in range [1, input_num_dimensions). * It has the purpose of squashing the first @p axis dimensions together. For instance, given a [4x4x4x4] image, * when @p axis is 2, the Softmax reduction will be applied on each of the [4x4] planes of the input image.
Can you please suggest some workaround or a temporary fix for this? This issue has broken all the networks.
Thanks, krgor
Hi @uu-praveeng and @krgor
Apologies for late response about this issue. I'll get back to you as soon as possible.
Thanks.
Hi @uu-praveeng and @krgor
I could reproduce the issue with code @uu-praveeng provided, and I think we already have a patch for that. https://review.mlplatform.org/c/ml/ComputeLibrary/+/3278
You can apply the patch on the 20.05 release (you may find a merge conflict but it should be some documentation related not the implementation.) and I could see softmax layer can output values other than 1.
Also, the patch will be part of 20.08 release, which is soon to be released, so you can wait for that.
I hope it helps.
Thanks.
@sanpar02 ,
Thanks a lot for prompt reply. I have cherry-picked this patch and now it works as expected. I will officially take this change along with 20.08.
One again thanks, krgor