You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/09/20 17:18:59 UTC

[GitHub] [incubator-mxnet] drivanov edited a comment on issue #16178: [WIP]improving argmax perf

drivanov edited a comment on issue #16178: [WIP]improving argmax perf
URL: https://github.com/apache/incubator-mxnet/pull/16178#issuecomment-533637642
 
 
   @access2rohit: It seems that to pass following test from  /work/mxnet/julia/test/unittest/ndarray.jl, lines1511-1531: 
   ```
   function test_argmax()
   . . .
     @info "NDArray::argmax"
      @info "NDArray::argmax::NaN"
     let
       A = [1.  5 3;
            NaN 2 6]
       x = NDArray(A)
   
       @test copy(argmax(x, dims = 1)) == [1 1 2]
       @test copy(argmax(x, dims = 2)) == reshape([2, 3], :, 1)
     end
   end
   ```
   We have to skip `NaN`'s. As far as I understand, in that case the outputs of `nd.argmax` and `np.nanarmax` should be identical and we will non need `nd.nanargmax`. Is it correct?
   
   BTW, what would be correct output of `nd.argmax` when all elements of vector will be `NaN`'s? 
   ```
       A = [1.  5 3;
            NaN NaN NaN]
   ```
    
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services