{"action":"created","comment":{"url":"https://api.github.com/repos/thu-ml/zhusuan/pulls/comments/157492563","pull_request_review_id":84111517,"id":157492563,"diff_hunk":"@@ -139,16 +127,21 @@ def e_obj(observed):\n     _eta = tf.Variable(tf.zeros([_n_chains, _D, K]), name='eta')\n \n     def _log_prior(observed):\n-        log_p_eta, _, _ = joint_obj(observed)\n-        return log_p_eta\n+        return lntm(observed, _n_chains, _D, K, V,\n+                    eta_mean, eta_logstd).local_log_prob('eta')\n+\n+    def _e_obj(observed):\n+        model = lntm(observed, _n_chains, _D, K, V,\n+                     eta_mean, eta_logstd)\n+        return model.local_log_prob('eta') + model.local_log_prob('x')\n ","path":"examples/topic_models/lntm_mcem.py","position":81,"original_position":81,"commit_id":"7f6df51a5233adbff5bdb6c55556b1a76011c0ae","original_commit_id":"7f6df51a5233adbff5bdb6c55556b1a76011c0ae","user":{"login":"thjashin","id":5267554,"avatar_url":"https://avatars3.githubusercontent.com/u/5267554?v=4","gravatar_id":"","url":"https://api.github.com/users/thjashin","html_url":"https://github.com/thjashin","followers_url":"https://api.github.com/users/thjashin/followers","following_url":"https://api.github.com/users/thjashin/following{/other_user}","gists_url":"https://api.github.com/users/thjashin/gists{/gist_id}","starred_url":"https://api.github.com/users/thjashin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thjashin/subscriptions","organizations_url":"https://api.github.com/users/thjashin/orgs","repos_url":"https://api.github.com/users/thjashin/repos","events_url":"https://api.github.com/users/thjashin/events{/privacy}","received_events_url":"https://api.github.com/users/thjashin/received_events","type":"User","site_admin":false},"body":"Can we reuse the above `e_obj` since the only difference is in `D` and `n_chains`.","created_at":"2017-12-18T14:07:26Z","updated_at":"2017-12-18T14:07:50Z","html_url":"https://github.com/thu-ml/zhusuan/pull/74#discussion_r157492563","pull_request_url":"https://api.github.com/repos/thu-ml/zhusuan/pulls/74","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/thu-ml/zhusuan/pulls/comments/157492563"},"html":{"href":"https://github.com/thu-ml/zhusuan/pull/74#discussion_r157492563"},"pull_request":{"href":"https://api.github.com/repos/thu-ml/zhusuan/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/thu-ml/zhusuan/pulls/74","id":152059973,"html_url":"https://github.com/thu-ml/zhusuan/pull/74","diff_url":"https://github.com/thu-ml/zhusuan/pull/74.diff","patch_url":"https://github.com/thu-ml/zhusuan/pull/74.patch","issue_url":"https://api.github.com/repos/thu-ml/zhusuan/issues/74","number":74,"state":"open","locked":false,"title":"Add multinomial option is_normalized and simplify lntm_mcem","user":{"login":"csy530216","id":14756235,"avatar_url":"https://avatars3.githubusercontent.com/u/14756235?v=4","gravatar_id":"","url":"https://api.github.com/users/csy530216","html_url":"https://github.com/csy530216","followers_url":"https://api.github.com/users/csy530216/followers","following_url":"https://api.github.com/users/csy530216/following{/other_user}","gists_url":"https://api.github.com/users/csy530216/gists{/gist_id}","starred_url":"https://api.github.com/users/csy530216/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csy530216/subscriptions","organizations_url":"https://api.github.com/users/csy530216/orgs","repos_url":"https://api.github.com/users/csy530216/repos","events_url":"https://api.github.com/users/csy530216/events{/privacy}","received_events_url":"https://api.github.com/users/csy530216/received_events","type":"User","site_admin":false},"body":"- Added multinomial option is_normalized to fit the case in LDA(not truly multinomial, but a production(multiplication) of variable number of categorical distribution. Also wrote some doc.\r\n- Simplify lntm_mcem\r\n\r\nHowever, the speed seems to be slower(e.g. 2.2s-->3.8s).","created_at":"2017-11-11T14:48:34Z","updated_at":"2017-12-18T14:07:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"72174c65bb33eed8136d29acc7e57bc913655804","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/thu-ml/zhusuan/pulls/74/commits","review_comments_url":"https://api.github.com/repos/thu-ml/zhusuan/pulls/74/comments","review_comment_url":"https://api.github.com/repos/thu-ml/zhusuan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thu-ml/zhusuan/issues/74/comments","statuses_url":"https://api.github.com/repos/thu-ml/zhusuan/statuses/7f6df51a5233adbff5bdb6c55556b1a76011c0ae","head":{"label":"thu-ml:multinomial","ref":"multinomial","sha":"7f6df51a5233adbff5bdb6c55556b1a76011c0ae","user":{"login":"thu-ml","id":19198992,"avatar_url":"https://avatars1.githubusercontent.com/u/19198992?v=4","gravatar_id":"","url":"https://api.github.com/users/thu-ml","html_url":"https://github.com/thu-ml","followers_url":"https://api.github.com/users/thu-ml/followers","following_url":"https://api.github.com/users/thu-ml/following{/other_user}","gists_url":"https://api.github.com/users/thu-ml/gists{/gist_id}","starred_url":"https://api.github.com/users/thu-ml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thu-ml/subscriptions","organizations_url":"https://api.github.com/users/thu-ml/orgs","repos_url":"https://api.github.com/users/thu-ml/repos","events_url":"https://api.github.com/users/thu-ml/events{/privacy}","received_events_url":"https://api.github.com/users/thu-ml/received_events","type":"Organization","site_admin":false},"repo":{"id":63605558,"name":"zhusuan","full_name":"thu-ml/zhusuan","owner":{"login":"thu-ml","id":19198992,"avatar_url":"https://avatars1.githubusercontent.com/u/19198992?v=4","gravatar_id":"","url":"https://api.github.com/users/thu-ml","html_url":"https://github.com/thu-ml","followers_url":"https://api.github.com/users/thu-ml/followers","following_url":"https://api.github.com/users/thu-ml/following{/other_user}","gists_url":"https://api.github.com/users/thu-ml/gists{/gist_id}","starred_url":"https://api.github.com/users/thu-ml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thu-ml/subscriptions","organizations_url":"https://api.github.com/users/thu-ml/orgs","repos_url":"https://api.github.com/users/thu-ml/repos","events_url":"https://api.github.com/users/thu-ml/events{/privacy}","received_events_url":"https://api.github.com/users/thu-ml/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thu-ml/zhusuan","description":"A Library for Bayesian Deep Learning, Generative Models, Based on Tensorflow","fork":false,"url":"https://api.github.com/repos/thu-ml/zhusuan","forks_url":"https://api.github.com/repos/thu-ml/zhusuan/forks","keys_url":"https://api.github.com/repos/thu-ml/zhusuan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thu-ml/zhusuan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thu-ml/zhusuan/teams","hooks_url":"https://api.github.com/repos/thu-ml/zhusuan/hooks","issue_events_url":"https://api.github.com/repos/thu-ml/zhusuan/issues/events{/number}","events_url":"https://api.github.com/repos/thu-ml/zhusuan/events","assignees_url":"https://api.github.com/repos/thu-ml/zhusuan/assignees{/user}","branches_url":"https://api.github.com/repos/thu-ml/zhusuan/branches{/branch}","tags_url":"https://api.github.com/repos/thu-ml/zhusuan/tags","blobs_url":"https://api.github.com/repos/thu-ml/zhusuan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thu-ml/zhusuan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thu-ml/zhusuan/git/refs{/sha}","trees_url":"https://api.github.com/repos/thu-ml/zhusuan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thu-ml/zhusuan/statuses/{sha}","languages_url":"https://api.github.com/repos/thu-ml/zhusuan/languages","stargazers_url":"https://api.github.com/repos/thu-ml/zhusuan/stargazers","contributors_url":"https://api.github.com/repos/thu-ml/zhusuan/contributors","subscribers_url":"https://api.github.com/repos/thu-ml/zhusuan/subscribers","subscription_url":"https://api.github.com/repos/thu-ml/zhusuan/subscription","commits_url":"https://api.github.com/repos/thu-ml/zhusuan/commits{/sha}","git_commits_url":"https://api.github.com/repos/thu-ml/zhusuan/git/commits{/sha}","comments_url":"https://api.github.com/repos/thu-ml/zhusuan/comments{/number}","issue_comment_url":"https://api.github.com/repos/thu-ml/zhusuan/issues/comments{/number}","contents_url":"https://api.github.com/repos/thu-ml/zhusuan/contents/{+path}","compare_url":"https://api.github.com/repos/thu-ml/zhusuan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thu-ml/zhusuan/merges","archive_url":"https://api.github.com/repos/thu-ml/zhusuan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thu-ml/zhusuan/downloads","issues_url":"https://api.github.com/repos/thu-ml/zhusuan/issues{/number}","pulls_url":"https://api.github.com/repos/thu-ml/zhusuan/pulls{/number}","milestones_url":"https://api.github.com/repos/thu-ml/zhusuan/milestones{/number}","notifications_url":"https://api.github.com/repos/thu-ml/zhusuan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thu-ml/zhusuan/labels{/name}","releases_url":"https://api.github.com/repos/thu-ml/zhusuan/releases{/id}","deployments_url":"https://api.github.com/repos/thu-ml/zhusuan/deployments","created_at":"2016-07-18T13:31:38Z","updated_at":"2017-12-18T06:36:02Z","pushed_at":"2017-12-16T06:56:53Z","git_url":"git://github.com/thu-ml/zhusuan.git","ssh_url":"git@github.com:thu-ml/zhusuan.git","clone_url":"https://github.com/thu-ml/zhusuan.git","svn_url":"https://github.com/thu-ml/zhusuan","homepage":"http://zhusuan.readthedocs.io","size":859,"stargazers_count":1035,"watchers_count":1035,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":204,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":204,"open_issues":9,"watchers":1035,"default_branch":"master"}},"base":{"label":"thu-ml:master","ref":"master","sha":"ae1cf2bd969667ca75fabae3a42f477f4d67c970","user":{"login":"thu-ml","id":19198992,"avatar_url":"https://avatars1.githubusercontent.com/u/19198992?v=4","gravatar_id":"","url":"https://api.github.com/users/thu-ml","html_url":"https://github.com/thu-ml","followers_url":"https://api.github.com/users/thu-ml/followers","following_url":"https://api.github.com/users/thu-ml/following{/other_user}","gists_url":"https://api.github.com/users/thu-ml/gists{/gist_id}","starred_url":"https://api.github.com/users/thu-ml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thu-ml/subscriptions","organizations_url":"https://api.github.com/users/thu-ml/orgs","repos_url":"https://api.github.com/users/thu-ml/repos","events_url":"https://api.github.com/users/thu-ml/events{/privacy}","received_events_url":"https://api.github.com/users/thu-ml/received_events","type":"Organization","site_admin":false},"repo":{"id":63605558,"name":"zhusuan","full_name":"thu-ml/zhusuan","owner":{"login":"thu-ml","id":19198992,"avatar_url":"https://avatars1.githubusercontent.com/u/19198992?v=4","gravatar_id":"","url":"https://api.github.com/users/thu-ml","html_url":"https://github.com/thu-ml","followers_url":"https://api.github.com/users/thu-ml/followers","following_url":"https://api.github.com/users/thu-ml/following{/other_user}","gists_url":"https://api.github.com/users/thu-ml/gists{/gist_id}","starred_url":"https://api.github.com/users/thu-ml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thu-ml/subscriptions","organizations_url":"https://api.github.com/users/thu-ml/orgs","repos_url":"https://api.github.com/users/thu-ml/repos","events_url":"https://api.github.com/users/thu-ml/events{/privacy}","received_events_url":"https://api.github.com/users/thu-ml/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thu-ml/zhusuan","description":"A Library for Bayesian Deep Learning, Generative Models, Based on Tensorflow","fork":false,"url":"https://api.github.com/repos/thu-ml/zhusuan","forks_url":"https://api.github.com/repos/thu-ml/zhusuan/forks","keys_url":"https://api.github.com/repos/thu-ml/zhusuan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thu-ml/zhusuan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thu-ml/zhusuan/teams","hooks_url":"https://api.github.com/repos/thu-ml/zhusuan/hooks","issue_events_url":"https://api.github.com/repos/thu-ml/zhusuan/issues/events{/number}","events_url":"https://api.github.com/repos/thu-ml/zhusuan/events","assignees_url":"https://api.github.com/repos/thu-ml/zhusuan/assignees{/user}","branches_url":"https://api.github.com/repos/thu-ml/zhusuan/branches{/branch}","tags_url":"https://api.github.com/repos/thu-ml/zhusuan/tags","blobs_url":"https://api.github.com/repos/thu-ml/zhusuan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thu-ml/zhusuan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thu-ml/zhusuan/git/refs{/sha}","trees_url":"https://api.github.com/repos/thu-ml/zhusuan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thu-ml/zhusuan/statuses/{sha}","languages_url":"https://api.github.com/repos/thu-ml/zhusuan/languages","stargazers_url":"https://api.github.com/repos/thu-ml/zhusuan/stargazers","contributors_url":"https://api.github.com/repos/thu-ml/zhusuan/contributors","subscribers_url":"https://api.github.com/repos/thu-ml/zhusuan/subscribers","subscription_url":"https://api.github.com/repos/thu-ml/zhusuan/subscription","commits_url":"https://api.github.com/repos/thu-ml/zhusuan/commits{/sha}","git_commits_url":"https://api.github.com/repos/thu-ml/zhusuan/git/commits{/sha}","comments_url":"https://api.github.com/repos/thu-ml/zhusuan/comments{/number}","issue_comment_url":"https://api.github.com/repos/thu-ml/zhusuan/issues/comments{/number}","contents_url":"https://api.github.com/repos/thu-ml/zhusuan/contents/{+path}","compare_url":"https://api.github.com/repos/thu-ml/zhusuan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thu-ml/zhusuan/merges","archive_url":"https://api.github.com/repos/thu-ml/zhusuan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thu-ml/zhusuan/downloads","issues_url":"https://api.github.com/repos/thu-ml/zhusuan/issues{/number}","pulls_url":"https://api.github.com/repos/thu-ml/zhusuan/pulls{/number}","milestones_url":"https://api.github.com/repos/thu-ml/zhusuan/milestones{/number}","notifications_url":"https://api.github.com/repos/thu-ml/zhusuan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thu-ml/zhusuan/labels{/name}","releases_url":"https://api.github.com/repos/thu-ml/zhusuan/releases{/id}","deployments_url":"https://api.github.com/repos/thu-ml/zhusuan/deployments","created_at":"2016-07-18T13:31:38Z","updated_at":"2017-12-18T06:36:02Z","pushed_at":"2017-12-16T06:56:53Z","git_url":"git://github.com/thu-ml/zhusuan.git","ssh_url":"git@github.com:thu-ml/zhusuan.git","clone_url":"https://github.com/thu-ml/zhusuan.git","svn_url":"https://github.com/thu-ml/zhusuan","homepage":"http://zhusuan.readthedocs.io","size":859,"stargazers_count":1035,"watchers_count":1035,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":204,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":204,"open_issues":9,"watchers":1035,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thu-ml/zhusuan/pulls/74"},"html":{"href":"https://github.com/thu-ml/zhusuan/pull/74"},"issue":{"href":"https://api.github.com/repos/thu-ml/zhusuan/issues/74"},"comments":{"href":"https://api.github.com/repos/thu-ml/zhusuan/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/thu-ml/zhusuan/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/thu-ml/zhusuan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thu-ml/zhusuan/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/thu-ml/zhusuan/statuses/7f6df51a5233adbff5bdb6c55556b1a76011c0ae"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"thjashin"}}