Why use exponential distribution to implement Gumbel softmax?
pingguokiller opened this issue · 1 comments
pingguokiller commented
In function select2withP of AutoDL-Projects\lib\models\shape_searchs\SoftSelect.py, the implementation of Gumbel softmax is below:
gumbels = -torch.empty_like(logits).exponential_().log()
I don't understand why to use exponential distribution to implement Gumbel softmax?
D-X-Y commented
I follow the implementation of PyTorch at here: https://pytorch.org/docs/stable/_modules/torch/nn/functional.html#gumbel_softmax