question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrate RandomVariable to use PyTorch distributions

See original GitHub issue

GPyTorch RandomVariables are essentially doing the same thing as PyTorch Distributions. We should try to leverage the PyTorch interface as much as possible.

Similarly to Pyro, we probably want to subclass each of the distributions (or at least subclassing the MultivariateNormal distribution). This will make it possible to work with LazyVariable covariances, and for us to do our custom fast sampling code.

Related to #123

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gpleisscommented, Sep 11, 2018

@Balandat looking through our other RandomVariables - it looks like most of them don’t use LazyTensors or any additional functionality. So we should probably only write custom MVN and MultitaskMVN distributions

0reactions
gpleisscommented, Sep 28, 2018

Closed by #288

Read more comments on GitHub >

github_iconTop Results From Across the Web

torch.distributions — PyTorch 1.13 documentation
This class is an intermediary between the Distribution class and distributions which belong to an exponential family mainly to check the correctness of...
Read more >
Understanding Shapes in PyTorch Distributions Package
Batch shape describes independent, not identically distributed draws. Namely, we may have a set of (different) parameterizations to the same ...
Read more >
Distributions - Pyro Documentation
This is mainly useful for wrapping existing PyTorch distributions for use in Pyro. Derived classes must first inherit from torch.distributions.distribution.
Read more >
gpytorch.distributions — GPyTorch 1.9.0 documentation
Constructs a multivariate normal random variable, based on mean and covariance. ... Convert a MVN into a batched Normal distribution ...
Read more >
What is the difference between sample() and rsample()?
Well, that explains why my first attempt at porting a VAE to use torch.distributions didn't work! The other reason is I used Normal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found