-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Milestone
Description
As mentioned in #402 (comment) we should add distribution methods upstream to perform all needed shape operations.
Currently Funsor's distribution shaping logic uses the pattern of creating fake distributions with dummy tensors to determine distribution event shape and batch shape. As a goal for Funsor use in Pyro 2.0, we should eliminate the need to ever instantiate a dummy tensor, and should eliminate the tensor shape caches.
Tasks
- Avoid creating distributions when inferring value domain #420 decide on shape helper interface
- Avoid creating distributions when inferring value domain #420 refactor Funsor to use the new methods instead of fake distributions
- Add a Distribution.infer_shapes() method to statically infer shapes pyro#2739 add to Pyro / PyTorch distributions
- Add Distribution.infer_shapes() for static shape analysis numpyro#901 add to NumPyro / JAX / TFP distributions
fehiepsifehiepsi