dist = torch.randn((100, 100))
softmax = nn.Softmax(dim=1)
out = softmax(dist)

This is all pretty standard and makes sense, but I am unable to figure out how to draw random samples from this distribution. In particular, I want to randomly find indices from dist which should be sampled following the softmax distribution.
Is there a way to do this?