Closed LucianBuzzo closed 1 year ago
Looks great! Thanks for the PR!
@christopherzimmerman Would you be able to cut a new release? Say v1.1.0? Otherwise I need to use a commit sha to get access to the new function - thanks! 🙏
@LucianBuzzo just tagged a release
This change adss a
multinomial
method to theTensor
class, allowing you to draw samples from a multinomial distribution. The multinomial method accepts a tensorinput
and will produce an outputtensor
that samples theinput
probabilities.The logic of this method is based on the equivalent
torch.multinomial
method: https://pytorch.org/docs/stable/generated/torch.multinomial.html