How to get unique values for a symbol?


#1

Hello, everyone. I am new to mxnet. I’d like to ask whether it is possible to get all unique values for a symbol (withou using asnumpy)?

Thanks a lot.


#2

Not exactly sure what you mean by “all unique values”. Can you clarify the question by adding a few more details or an example showing the input and intended output you’re trying to achieve? You can get the value(s) from a symbol using the python’s __getitem__ syntax i.e s[0] where s is the symbol.


#3

I just find that I can do this with numpy in a custom operator. It is not necessary to do it as symbol. Thanks. What I want to use is numpy.unique()