Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Add unit distribution for adding to log prob #1051

Closed
wants to merge 1 commit into from

Conversation

jpchen
Copy link
Contributor

@jpchen jpchen commented Oct 12, 2021

Summary:
Addresses #1041. Imported the Unit Dist (with some minor modifications) from pyro. This will allow users to add terms to the model density:

bm.random_variable
def increment_log_prob():
    val = Normal(0., 1.).log_prob(1.)
    return Unit(val)

In the future we can wrap this with a factor statement.

Reviewed By: neerajprad

Differential Revision: D31516303

Summary:
Addresses [#1041](facebookresearch/beanmachine#1041). Imported the Unit Dist (with some minor modifications) from pyro. This will allow users to add terms to the model density:
```
bm.random_variable
def increment_log_prob():
    val = Normal(0., 1.).log_prob(1.)
    return Unit(val)
```

In the future we can wrap this with a `factor` statement.

Reviewed By: neerajprad

Differential Revision: D31516303

fbshipit-source-id: 171e08797cd0367dd985f13b149c9c766c6fddef
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D31516303

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 13, 2021
@jpchen jpchen closed this Oct 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants