After looking around, I also think its not possible right now. I opened a feature request issue on Github.
I need this list of indices for F.take() , which takes a list of indices (ints) and no masks.
I work with an architecture that splits the mini-batch (representing images) and sends them to different branches. I have a binary mask array indicating to which branch a image of the mini-batch should be send. So I want to use take() to split the minibatch given that binary mask, but it only takes indices as argument and apparently I cant retrieve them if I want to be able to hybridize.
It’s not such a big problem for me, I can just send the whole mini-batch to both branches and then use the mask to merge the results together to get the same result as if I would have split my mini-batch. But would have been nice to not do the unnecessary operations…
I feel like the Mxnet API is missing some functions to retrive index lists. I don’t really see any function (in both ndarray and symbols) that returns something that can be used as an index list argument, which is needed for F.take(). Only topk() I guess, but as I do not know the amount of 1 in my indicator array I cannot use it.
Anyway, thanks for the replies!