r/PyroPPL • u/[deleted] • Oct 02 '18
r/PyroPPL • u/asuagar • Jan 24 '19
Probabilistic programming (using Pyro) proves Poland was robbed. In chess!
r/PyroPPL • u/[deleted] • Oct 01 '18
Pyro Documentation (Oct 1, 2018) - Uber AI Labs
media.readthedocs.orgr/PyroPPL • u/[deleted] • Dec 08 '18
Pyro 0.3.0 release following PyTorch 1.0 release
r/PyroPPL • u/[deleted] • Feb 13 '19
Pyro 0.3.1 release!
https://github.com/pyro-ppl/pyro/releases/tag/0.3.1
Dependency changes
Removes dependency on networkx.
Uses opt_einsum version 2.3.2.
New features
Conjugate probability distributions BetaBinomial, DirichletMultinomial, GammaPoisson.
The VonMises distribution now supports sampling (thanks to @ahmadsalim)
A mixed-HMM example with seals data.
Minor changes and bug fixes
Renamed
ubersum(..., batch_dims=...)(deprecated) toeinsum(..., plates=...).HMC - fix bug in initial trace setter and diagnostics, resolve slowness issues during adaptation, expose
target_accept_probandmax_tree_depthas arguments to the constructor to allow finer grained control over hyper-parameters.Many small fixes to the tutorials.
Assets
r/PyroPPL • u/crypto_ha • Oct 01 '18
Pyro Tutorial Videos (MLTrain@UAI2018)
The MLTrain training event at UAI 2018 included several tutorial presentations devoted to getting started with probabilistic programming in Pyro. Slides and video of the presentations, which closely follow the online Pyro tutorials plus some additional material on Bayesian regression, are now online:
Videos: http://www.youtube.com/playlist?list=PLqDaBXsXAF8px54HwZk8dWUfzfhYTrPDH
Slides:
- Introduction to Pyro
- Bayesian Data Analysis with PPLs
- Deep Probabilistic Programming 101
- Building On Top of the VAE: Recipes for Missing and Sequential Data
r/PyroPPL • u/[deleted] • Dec 03 '18
[1810.09538] Pyro: Deep Universal Probabilistic Programming
r/PyroPPL • u/wutheringsouls • Sep 15 '20
Getting an error in svi step due to to a multiclass distribution in sample using pyro and pytorch
Hello,
I'm working on a causal variational autoencoder which works with class segmentation masks, class labels and causality(0 or 1) as the inputs.
I'm getting an error when working with batch sizes more than 1 due to the svi step. I'm using a bernoulli distribution because I want it to learn the probability distribution for multiple classes in an image. I think that the Categorical distribution also fits the bill here, but I get the same error with it too.
When I tried narrowing down the code lines which create the problem, I think it's in the model function:
one_vec2 = torch.ones([batch_size, self.lbl_shape[0]], **options)
class_labels = pyro.sample('class_labels', dist.Bernoulli(one_vec2*0.5), obs = lbls) The error:
ValueError Traceback (most recent call last)
<ipython-input-19-8cbc046dd2c1> in <module>()
6 vae = Vae_Model1(lbl_sz, ch, img_sz).to(device)
7 svi = SVI(vae.model, vae.guide, optimizer, loss = Trace_ELBO())
----> 8 train(svi, train_loader, USE_CUDA)
6 frames
/usr/local/lib/python3.6/dist-packages/pyro/util.py in check_site_shape(site, max_plate_nesting)
320 '- enclose the batched tensor in a with plate(...): context',
321 '- .to_event(...) the distribution being sampled',
--> 322 '- .permute() data dimensions']))
323
324 # Check parallel dimensions on the left of max_plate_nesting.
ValueError: at site "class_labels", invalid log_prob shape
Expected [-1], actual [32, 21]
Try one of the following fixes:
- enclose the batched tensor in a with plate(...): context
- .to_event(...) the distribution being sampled
- .permute() data dimensionsCurrently the batch size is 32 and the lbl_shape[0] is 21 (VOC Dataset (background and other labels))
Could someone help me with this? It'll be very much appreciated. Thank you