keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
61.6k stars 19.42k forks source link

Would Keras support unique function? #20140

Open cqwangding opened 3 weeks ago

cqwangding commented 3 weeks ago

Jax unique: https://jax.readthedocs.io/en/latest/_autosummary/jax.numpy.unique.html TF unique: https://www.tensorflow.org/api_docs/python/tf/unique

mehtamansi29 commented 3 weeks ago

Hi @cqwangding -

Keras doesn't have unique function. As keras is high level API on the top of tensorflow,jax,numpy,torch. And this unique function is for data manipulation which can be done before keras models.

So all these keras backends(tensorflow,jax,numpy,torch) has seperate unique functions.

tensorflow: tf.unique jax: jax.numpy.unique torch: torch.unique numpy: numpy.unique

haifeng-jin commented 3 weeks ago

@mehtamansi29 This feature request is from AdBrain. They may use it in the model instead of the data pipeline. Not exactly sure about which model they are using though.

mattdangerw commented 2 weeks ago

I believe @hertschuh is working on a unique op. Though he is out for two weeks, so we can expect more action on this when he is back!