vithursant / VAE-Gumbel-Softmax

An implementation of a Variational-Autoencoder using the Gumbel-Softmax reparametrization trick in TensorFlow (tested on r1.5 CPU and GPU) in ICLR 2017.
Apache License 2.0
73 stars 18 forks source link

Gumbel trick error #1

Open maestrojeong opened 6 years ago

maestrojeong commented 6 years ago

https://github.com/vithursant/VAE-Gumbel-Softmax/blob/master/vae_gumbel_softmax.py#L55 You use the logits, however we have to use log(logits) to perform gumbel max trick as stated in https://timvieira.github.io/blog/post/2014/07/31/gumbel-max-trick/

j314erre commented 2 months ago

gumbel softmax((log(pi)+g)/tau), where pi are class probabilities, therefore softmax((logits + g)/tau) will suffice. https://arxiv.org/pdf/1611.01144