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.

Update pyro.param to read event_dim from the constraint

See original GitHub issue

#1796 added an event_dim kwarg to pyro.param(), which #2323 used to support subsampling in AutoNormal and AutoDelta. However now that constraints have an .event_dim attribute (https://github.com/pytorch/pytorch/pull/50547, https://github.com/pytorch/pytorch/pull/50581), we can deprecate pyro.param’s event_dim kwarg and read that directly off the constraint kwarg.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fehiepsicommented, Jun 6, 2021

I think event_dim kwarg has been used to decide if we want to subsample a parameter so if we follow this, we need a way to tell the inference algorithms that we want to subsample over a parameter.

0reactions
Padarncommented, Nov 13, 2021

Completely agree. Thanks,

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parameters - Pyro Documentation
Returns an iterator over (name, unconstrained_value) tuples for each parameter in the ParamStore. Note that, in the event the parameter is constrained, ...
Read more >
Pyro Documentation - Read the Docs
Pyro supports Python 2.7. ... Returns Number of dimensions of individual events. ... Iterate over constrained parameter values.
Read more >
pyro.primitives — Pyro documentation - Read the Docs
Tensor or callable :param constraint: torch constraint, ... If unspecified, all dimensions will be considered event dims and no subsampling will be ...
Read more >
pyro/tensor_shapes.ipynb at dev - GitHub
Because the dependent random variables define probability together, the .log_prob() method only produces a single number for each event of shape ...
Read more >
Different access methods to Pyro Paramstore give different ...
pyro.param() returns transformed parameters in this case to the positive reals for ... Note that, in the event the parameter is constrained, ...
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