Closed pingguokiller closed 4 years ago
In function select2withP of AutoDL-Projects\lib\models\shape_searchs\SoftSelect.py, the implementation of Gumbel softmax is below:
gumbels = -torch.emptylike(logits).exponential().log()
I don't understand why to use exponential distribution to implement Gumbel softmax?
I follow the implementation of PyTorch at here: https://pytorch.org/docs/stable/_modules/torch/nn/functional.html#gumbel_softmax
In function select2withP of AutoDL-Projects\lib\models\shape_searchs\SoftSelect.py, the implementation of Gumbel softmax is below:
gumbels = -torch.emptylike(logits).exponential().log()
I don't understand why to use exponential distribution to implement Gumbel softmax?