pytorch icon indicating copy to clipboard operation
pytorch copied to clipboard

torch::distributions module for C++ frontend API

Open DapengFeng opened this issue 4 months ago • 0 comments

🚀 The feature, motivation and pitch

It seems that torch.distribution is only support in pytorch, but not for libtorch, the C++ frontend. And some C++ applications need to sample data from the distributions. So the implementation of the torch.distributions is helpful.

For example, https://discuss.pytorch.org/t/how-to-create-multivariate-normal-samples-in-c-given-mean-vector-and-covariance-matrix/123960

https://discuss.pytorch.org/t/how-to-use-torch-distributions-gumbel-in-c-api/172368

https://discuss.pytorch.org/t/how-to-create-multivariate-normal-samples-in-c-given-mean-vector-and-covariance-matrix/123960

https://discuss.pytorch.org/t/torch-distributions-categorical/45747

https://discuss.pytorch.org/t/is-there-an-equivalent-of-torch-distributions-multivariatenormal-in-libtorch-the-c-api-for-pytorch/211784/2

Alternatives

No response

Additional context

No response

DapengFeng avatar Oct 19 '24 12:10 DapengFeng