The torch.distributions.Bernoulli.log_prob function in Python's torch.distributions module calculates the logarithm of the probability density/mass function (pdf/pmf) for each input value of a Bernoulli distribution. It takes in a tensor of input values and returns a tensor of corresponding log probabilities. The function is useful for evaluating the logarithm of the probability of observing a set of values under a Bernoulli distribution.
Python Bernoulli.log_prob - 30 examples found. These are the top rated real world Python examples of torch.distributions.Bernoulli.log_prob extracted from open source projects. You can rate examples to help us improve the quality of examples.