profile
viewpoint

Ask questionsAddons Sparsemax gets different results than Contrib sparsemax

System information

  • TensorFlow version and how it was installed (source or binary): Nightly
  • TensorFlow-Addons version and how it was installed (source or binary): git commit 8bacf4d434974b8821a598aa4d1c9534a6581a5e

Describe the bug We've gotten a google-internal bug report that sparsemax implementation in tensorflow addons: https://github.com/tensorflow/addons/blob/8bacf4d434974b8821a598aa4d1c9534a6581a5e/tensorflow_addons/activations/sparsemax.py#L25

Produces different results than the sparsemax implementation that was in contrib: https://github.com/tensorflow/tensorflow/blob/23c218785eac5bfe737eec4f8081fd0ef8e0684d/tensorflow/contrib/sparsemax/python/ops/sparsemax.py#L30

For the user's model, the contrib implementation produced better results than the addons implementation.


Are these differences expected? Or is it possible that there is a bug in the addons sparsemax implementation?

tensorflow/addons

Answer questions tomerk

I've passed along the request for a reproducible example, will follow up if they manage to make one.

useful!

Related questions

error when importing tensorflow_addons hot 2
please add more activation functions hot 1
LookAhead + RAdam + mixed_fp16 = apply_gradients() got an unexpected keyword argument 'experimental_aggregate_gradients' - addons hot 1
Segmentation fault with tfa.seq2seq.gather_tree hot 1
installation issues with tensorflow==2.0.0-beta1 hot 1
MovingAverage does not work with MirroredStrategy hot 1
Segmentation Fault hot 1
Migrate gelu to core hot 1
installation issues with tensorflow==2.0.0-beta1 hot 1
pip install tensorflow-addons fails on windows machine Python 3.6.4 hot 1
Missing symbol for Abseil ParseTime Op hot 1
installation issues with tensorflow==2.0.0-beta1 hot 1
WeightNormalization data init fails with Keras experimental_run_tf_function hot 1
Packaged Addons don't run on tf-nightly-2.0 hot 1
tfa.seq2seq.sequence_loss can't average over one dimension (batch or timesteps) while summing over the other one hot 1
Github User Rank List