Hi everybody,
I am exploring Pytorch code. I manage to run the code in debug mode.

   m = Bernoulli(torch.tensor([0.3]))
    s = m.sample()  # 30% chance 1; 70% chance 0
    print('a sample: ', s)

    # calling directly
    print('calling directly torch.bernoulli()', torch.bernoulli(torch.Tensor([0.3])))

I tried to find where torch.bernoulli was implemented but couldn’t find it. Pycharm just indicates this is a built-in function.
Thank you for your time!