sxjscience commented on issue #12197: topk regression URL: https://github.com/apache/incubator-mxnet/issues/12197#issuecomment-414568171 I think https://github.com/apache/incubator-mxnet/pull/12250 has solved this problem. Now we can use `mx.nd.topk(..., dtype=np.int32)` to set the dtype of the output indices. ```python import mxnet as mx import numpy as np print(mx.nd.topk(mx.nd.array(np.arange(256*300096).reshape(8, -1), dtype=np.int32), k=4, dtype=np.int32)) ``` Result: ``` [[9603071 9603070 9603069 9603068] [9603071 9603070 9603069 9603068] [9603071 9603070 9603069 9603068] [9603071 9603070 9603069 9603068] [9603071 9603070 9603069 9603068] [9603071 9603070 9603069 9603068] [9603071 9603070 9603069 9603068] [9603071 9603070 9603069 9603068]] <NDArray 8x4 @cpu(0)> ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
