jonasrauber / eagerpy

PyTorch, TensorFlow, JAX and NumPy — all of them natively using the same code
https://eagerpy.jonasrauber.de
MIT License
693 stars 39 forks source link

Inclusion of probability distributions (scope question) #26

Open phinate opened 3 years ago

phinate commented 3 years ago

Hi! Thanks for the awesome project -- a unified tensor interface is something that will help a lot of projects :)

I wanted to ask about the current/future scope of eagerpy, specifically on the inclusion of probability distributions like in torch.distributions, or tfp.distributions? It seems like a more substantial project, and so may be more of a stand-alone effort, but I think this would be a great asset for people who want to keep fully agnostic to frameworks.

As an example, a project I work with (pyhf) has it's own implementation of Tensor that aims for essentially what eagerpy does, but we also use it for probability distributions too within the module. This is done by wrapping around existing implementations and adding the extra math where needed -- my first impression with eagerpy is that this may be better handled if there were stand-alone implementations of distributions using only eagerpy tensors, but I'm not sure what the more practical option is.

Eager (hehe) to hear your thoughts!

jonasrauber commented 3 years ago

I don't have any plans to add something like this, but I would certainly consider contributions in this direction.