Solved by ptrblck in post #2 
              
              
                The passed weights are used in torch.multinomial as seen here, which is a random function, so you cannot expect a perfectly sampled distribution. 
The sample count will approximate the expected number, the more samples you are drawing.