Gumbel-(Soft)max sampling
This demo illustrates the Gumbel-(Soft)max tricks and shows the influence of the Gumbel-Softmax temperature λ and the scale parameter of the added Gumbel noise β.
Details can be found in the corresponding paper.
Here you can also find a Jupyter Notebook that accompanies Figure 4 of the paper, and provides insight in the different routes that can be taken to draw a soft or hard sample from a categorical distribution using the Gumbel-(Soft)max trick.
Distribution settings
or fill yourself: