import torch normal = torch.distributions.Normal(0, 1) samples = normal.sample((5,)) print(samples)
import torch normal = torch.distributions.Normal(-3, 5) samples = normal.sample((3, 2)) print(samples)
import torch normal = torch.distributions.Normal(1, 2) x = torch.tensor([[0.5, 2], [3, -1.5]]) log_prob = normal.log_prob(x) print(log_prob)The `torch.distributions` package is a standard PyTorch library for working with probability distributions. It can be found in the `torch.distributions` module.