D-X-Y/AutoDL-Projects

Why use exponential distribution to implement Gumbel softmax?

pingguokiller opened this issue · 1 comments

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?