Usage of torch.distribution

I notice that there are torch.distribution.sample(), torch.distribution.log_prob() something like that in PyTorch document. They can be used in sampling data and calculating the log probability in reinforcement learning right? Why do I seldom see anyone use them? Is it because there are some mistakes in the torch. distribution gradient?

1 Like