Pytorch: Bernoulli "without replacement"

25 views Asked by At

Given a probability tensor, how can I use torch.bernoulli to generate multiple samplings while ensuring they are all distinct? Is there any better way than the naive way, i.e., just sampling and re-trying if colliding? Any method using other libraries (e.g., numpy, scipy) are also fine!

0

There are 0 answers