{"action":"created","issue":{"url":"https://api.github.com/repos/probtorch/pytorch/issues/121","repository_url":"https://api.github.com/repos/probtorch/pytorch","labels_url":"https://api.github.com/repos/probtorch/pytorch/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/probtorch/pytorch/issues/121/comments","events_url":"https://api.github.com/repos/probtorch/pytorch/issues/121/events","html_url":"https://github.com/probtorch/pytorch/pull/121","id":293959612,"number":121,"title":"Implement TruncatedDistribution","user":{"login":"alicanb","id":1093846,"avatar_url":"https://avatars2.githubusercontent.com/u/1093846?v=4","gravatar_id":"","url":"https://api.github.com/users/alicanb","html_url":"https://github.com/alicanb","followers_url":"https://api.github.com/users/alicanb/followers","following_url":"https://api.github.com/users/alicanb/following{/other_user}","gists_url":"https://api.github.com/users/alicanb/gists{/gist_id}","starred_url":"https://api.github.com/users/alicanb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alicanb/subscriptions","organizations_url":"https://api.github.com/users/alicanb/orgs","repos_url":"https://api.github.com/users/alicanb/repos","events_url":"https://api.github.com/users/alicanb/events{/privacy}","received_events_url":"https://api.github.com/users/alicanb/received_events","type":"User","site_admin":false},"labels":[{"id":757689857,"url":"https://api.github.com/repos/probtorch/pytorch/labels/WIP","name":"WIP","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-02-02T17:11:23Z","updated_at":"2018-02-02T19:36:37Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/probtorch/pytorch/pulls/121","html_url":"https://github.com/probtorch/pytorch/pull/121","diff_url":"https://github.com/probtorch/pytorch/pull/121.diff","patch_url":"https://github.com/probtorch/pytorch/pull/121.patch"},"body":"this PR adds:\r\n- `.cdf()` and `icdf()` methods for `Distribution` and tests. (Populated only for `Normal` for now)\r\n- `TruncatedDistribution` class\r\n- `TruncatedNormal` class\r\n\r\ncloses #78, touches #120 \r\n@tbrx I forgot you volunteered for this, want to work together? This is a very rough sketch at the moment. @fritzo it's not at the stage where I request a review, but comments welcome as always "},"comment":{"url":"https://api.github.com/repos/probtorch/pytorch/issues/comments/362684697","html_url":"https://github.com/probtorch/pytorch/pull/121#issuecomment-362684697","issue_url":"https://api.github.com/repos/probtorch/pytorch/issues/121","id":362684697,"user":{"login":"alicanb","id":1093846,"avatar_url":"https://avatars2.githubusercontent.com/u/1093846?v=4","gravatar_id":"","url":"https://api.github.com/users/alicanb","html_url":"https://github.com/alicanb","followers_url":"https://api.github.com/users/alicanb/followers","following_url":"https://api.github.com/users/alicanb/following{/other_user}","gists_url":"https://api.github.com/users/alicanb/gists{/gist_id}","starred_url":"https://api.github.com/users/alicanb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alicanb/subscriptions","organizations_url":"https://api.github.com/users/alicanb/orgs","repos_url":"https://api.github.com/users/alicanb/repos","events_url":"https://api.github.com/users/alicanb/events{/privacy}","received_events_url":"https://api.github.com/users/alicanb/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T19:36:37Z","updated_at":"2018-02-02T19:36:37Z","author_association":"COLLABORATOR","body":"Do you think rejection sampling would be fast enough? Should we write low\nlevel functions for it?\n\nOn Fri, Feb 2, 2018, 2:07 PM Fritz Obermeyer <notifications@github.com>\nwrote:\n\n> Re: numerical stability, one option would be to use rejection sampling to\n> draw samples and merely use the cdf derivative to compute reparameterized\n> gradients:\n>\n> def sample(self):\n>     ...use rejection sampling...\n> def rsample(self):\n>     x = self.sample()  # detached\n>     cdf = self.cdf(x)\n>     pdf = self.log_prob(x).exp()\n>     return x + (cdf.detach() - cdf) / pdf.detach()\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/probtorch/pytorch/pull/121#issuecomment-362674533>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABCw1tQZo_ATLVbsWMUVQUPmhz8BtYjGks5tQ1slgaJpZM4R3fzz>\n> .\n>\n"}}
{"actor":{"display_login":"alicanb"}}