{"action":"created","comment":{"url":"https://api.github.com/repos/Theano/Theano/pulls/comments/34902791","id":34902791,"diff_hunk":"@@ -3923,27 +3923,32 @@ def local_elemwise_sub_zeros(node):\n \n @register_canonicalize\n @register_specialize\n-@gof.local_optimizer([T.Sum])\n-def local_sum_div_dimshuffle(node):\n+@gof.local_optimizer([T.Sum, T.elemwise.Prod])\n+def local_sum_prod_div_dimshuffle(node):\n     '''sum(a / dimshuffle{...}(b), axis=l) -> sum(a, axis={...}) / b,\n-    if dimension l of the DimShuffle is 'x'.'''\n-    # TODO: extend it to product, and quotient of products\n+       if dimension l of the DimShuffle is 'x'\n+\n+       or\n+\n+       prod(a / dimshuffle{...}(b), axis=l) -> prod(a, axis={...}) / b,\n+      if dimension l of the DimShuffle is 'x'","path":"theano/tensor/opt.py","position":16,"original_position":16,"commit_id":"1193d4e57cb2e3dec85797f75f110fb8ee937406","original_commit_id":"c8cccd0aba3544c40fc53363af9f9281a5df0139","user":{"login":"mohammadpz","id":3185764,"avatar_url":"https://avatars.githubusercontent.com/u/3185764?v=3","gravatar_id":"","url":"https://api.github.com/users/mohammadpz","html_url":"https://github.com/mohammadpz","followers_url":"https://api.github.com/users/mohammadpz/followers","following_url":"https://api.github.com/users/mohammadpz/following{/other_user}","gists_url":"https://api.github.com/users/mohammadpz/gists{/gist_id}","starred_url":"https://api.github.com/users/mohammadpz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohammadpz/subscriptions","organizations_url":"https://api.github.com/users/mohammadpz/orgs","repos_url":"https://api.github.com/users/mohammadpz/repos","events_url":"https://api.github.com/users/mohammadpz/events{/privacy}","received_events_url":"https://api.github.com/users/mohammadpz/received_events","type":"User","site_admin":false},"body":"I'm a bit confused. what is the dimension of ```b```?","created_at":"2015-07-17T15:54:33Z","updated_at":"2015-07-17T15:54:33Z","html_url":"https://github.com/Theano/Theano/pull/3149#discussion_r34902791","pull_request_url":"https://api.github.com/repos/Theano/Theano/pulls/3149","_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments/34902791"},"html":{"href":"https://github.com/Theano/Theano/pull/3149#discussion_r34902791"},"pull_request":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3149"}}},"pull_request":{"url":"https://api.github.com/repos/Theano/Theano/pulls/3149","id":40087334,"html_url":"https://github.com/Theano/Theano/pull/3149","diff_url":"https://github.com/Theano/Theano/pull/3149.diff","patch_url":"https://github.com/Theano/Theano/pull/3149.patch","issue_url":"https://api.github.com/repos/Theano/Theano/issues/3149","number":3149,"state":"open","locked":false,"title":"changing local_sum_div_dimshuffle to local_sum_prod_div_dimshuffle","user":{"login":"mohammadpz","id":3185764,"avatar_url":"https://avatars.githubusercontent.com/u/3185764?v=3","gravatar_id":"","url":"https://api.github.com/users/mohammadpz","html_url":"https://github.com/mohammadpz","followers_url":"https://api.github.com/users/mohammadpz/followers","following_url":"https://api.github.com/users/mohammadpz/following{/other_user}","gists_url":"https://api.github.com/users/mohammadpz/gists{/gist_id}","starred_url":"https://api.github.com/users/mohammadpz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohammadpz/subscriptions","organizations_url":"https://api.github.com/users/mohammadpz/orgs","repos_url":"https://api.github.com/users/mohammadpz/repos","events_url":"https://api.github.com/users/mohammadpz/events{/privacy}","received_events_url":"https://api.github.com/users/mohammadpz/received_events","type":"User","site_admin":false},"body":"Regarding #399 \r\n@carriepl , could you please take a look at my PR?","created_at":"2015-07-16T01:42:37Z","updated_at":"2015-07-17T15:54:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d02cf63aac4f7f11c0126cb965358cb94e67b42a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Theano/Theano/pulls/3149/commits","review_comments_url":"https://api.github.com/repos/Theano/Theano/pulls/3149/comments","review_comment_url":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/3149/comments","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/1193d4e57cb2e3dec85797f75f110fb8ee937406","head":{"label":"mohammadpz:opt_of_local_sum_div_dimshuffle","ref":"opt_of_local_sum_div_dimshuffle","sha":"1193d4e57cb2e3dec85797f75f110fb8ee937406","user":{"login":"mohammadpz","id":3185764,"avatar_url":"https://avatars.githubusercontent.com/u/3185764?v=3","gravatar_id":"","url":"https://api.github.com/users/mohammadpz","html_url":"https://github.com/mohammadpz","followers_url":"https://api.github.com/users/mohammadpz/followers","following_url":"https://api.github.com/users/mohammadpz/following{/other_user}","gists_url":"https://api.github.com/users/mohammadpz/gists{/gist_id}","starred_url":"https://api.github.com/users/mohammadpz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohammadpz/subscriptions","organizations_url":"https://api.github.com/users/mohammadpz/orgs","repos_url":"https://api.github.com/users/mohammadpz/repos","events_url":"https://api.github.com/users/mohammadpz/events{/privacy}","received_events_url":"https://api.github.com/users/mohammadpz/received_events","type":"User","site_admin":false},"repo":{"id":27127542,"name":"Theano","full_name":"mohammadpz/Theano","owner":{"login":"mohammadpz","id":3185764,"avatar_url":"https://avatars.githubusercontent.com/u/3185764?v=3","gravatar_id":"","url":"https://api.github.com/users/mohammadpz","html_url":"https://github.com/mohammadpz","followers_url":"https://api.github.com/users/mohammadpz/followers","following_url":"https://api.github.com/users/mohammadpz/following{/other_user}","gists_url":"https://api.github.com/users/mohammadpz/gists{/gist_id}","starred_url":"https://api.github.com/users/mohammadpz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohammadpz/subscriptions","organizations_url":"https://api.github.com/users/mohammadpz/orgs","repos_url":"https://api.github.com/users/mohammadpz/repos","events_url":"https://api.github.com/users/mohammadpz/events{/privacy}","received_events_url":"https://api.github.com/users/mohammadpz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mohammadpz/Theano","description":"Optimizing GPU-meta-programming code generating array oriented optimizing math compiler in Python","fork":true,"url":"https://api.github.com/repos/mohammadpz/Theano","forks_url":"https://api.github.com/repos/mohammadpz/Theano/forks","keys_url":"https://api.github.com/repos/mohammadpz/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mohammadpz/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mohammadpz/Theano/teams","hooks_url":"https://api.github.com/repos/mohammadpz/Theano/hooks","issue_events_url":"https://api.github.com/repos/mohammadpz/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/mohammadpz/Theano/events","assignees_url":"https://api.github.com/repos/mohammadpz/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/mohammadpz/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/mohammadpz/Theano/tags","blobs_url":"https://api.github.com/repos/mohammadpz/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mohammadpz/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mohammadpz/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/mohammadpz/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mohammadpz/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/mohammadpz/Theano/languages","stargazers_url":"https://api.github.com/repos/mohammadpz/Theano/stargazers","contributors_url":"https://api.github.com/repos/mohammadpz/Theano/contributors","subscribers_url":"https://api.github.com/repos/mohammadpz/Theano/subscribers","subscription_url":"https://api.github.com/repos/mohammadpz/Theano/subscription","commits_url":"https://api.github.com/repos/mohammadpz/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/mohammadpz/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/mohammadpz/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/mohammadpz/Theano/issues/comments{/number}","contents_url":"https://api.github.com/repos/mohammadpz/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/mohammadpz/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mohammadpz/Theano/merges","archive_url":"https://api.github.com/repos/mohammadpz/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mohammadpz/Theano/downloads","issues_url":"https://api.github.com/repos/mohammadpz/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/mohammadpz/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/mohammadpz/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/mohammadpz/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mohammadpz/Theano/labels{/name}","releases_url":"https://api.github.com/repos/mohammadpz/Theano/releases{/id}","created_at":"2014-11-25T13:41:37Z","updated_at":"2015-03-21T16:09:43Z","pushed_at":"2015-07-17T15:18:11Z","git_url":"git://github.com/mohammadpz/Theano.git","ssh_url":"git@github.com:mohammadpz/Theano.git","clone_url":"https://github.com/mohammadpz/Theano.git","svn_url":"https://github.com/mohammadpz/Theano","homepage":"http://www.deeplearning.net/software/theano","size":36555,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Theano:master","ref":"master","sha":"e9e94b4c587ea33ba122759b026ef36c0073de0a","user":{"login":"Theano","id":970517,"avatar_url":"https://avatars.githubusercontent.com/u/970517?v=3","gravatar_id":"","url":"https://api.github.com/users/Theano","html_url":"https://github.com/Theano","followers_url":"https://api.github.com/users/Theano/followers","following_url":"https://api.github.com/users/Theano/following{/other_user}","gists_url":"https://api.github.com/users/Theano/gists{/gist_id}","starred_url":"https://api.github.com/users/Theano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Theano/subscriptions","organizations_url":"https://api.github.com/users/Theano/orgs","repos_url":"https://api.github.com/users/Theano/repos","events_url":"https://api.github.com/users/Theano/events{/privacy}","received_events_url":"https://api.github.com/users/Theano/received_events","type":"Organization","site_admin":false},"repo":{"id":2183193,"name":"Theano","full_name":"Theano/Theano","owner":{"login":"Theano","id":970517,"avatar_url":"https://avatars.githubusercontent.com/u/970517?v=3","gravatar_id":"","url":"https://api.github.com/users/Theano","html_url":"https://github.com/Theano","followers_url":"https://api.github.com/users/Theano/followers","following_url":"https://api.github.com/users/Theano/following{/other_user}","gists_url":"https://api.github.com/users/Theano/gists{/gist_id}","starred_url":"https://api.github.com/users/Theano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Theano/subscriptions","organizations_url":"https://api.github.com/users/Theano/orgs","repos_url":"https://api.github.com/users/Theano/repos","events_url":"https://api.github.com/users/Theano/events{/privacy}","received_events_url":"https://api.github.com/users/Theano/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Theano/Theano","description":"Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.","fork":false,"url":"https://api.github.com/repos/Theano/Theano","forks_url":"https://api.github.com/repos/Theano/Theano/forks","keys_url":"https://api.github.com/repos/Theano/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Theano/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Theano/Theano/teams","hooks_url":"https://api.github.com/repos/Theano/Theano/hooks","issue_events_url":"https://api.github.com/repos/Theano/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/Theano/Theano/events","assignees_url":"https://api.github.com/repos/Theano/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/Theano/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/Theano/Theano/tags","blobs_url":"https://api.github.com/repos/Theano/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Theano/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Theano/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/Theano/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/Theano/Theano/languages","stargazers_url":"https://api.github.com/repos/Theano/Theano/stargazers","contributors_url":"https://api.github.com/repos/Theano/Theano/contributors","subscribers_url":"https://api.github.com/repos/Theano/Theano/subscribers","subscription_url":"https://api.github.com/repos/Theano/Theano/subscription","commits_url":"https://api.github.com/repos/Theano/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/Theano/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/Theano/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/Theano/Theano/issues/comments{/number}","contents_url":"https://api.github.com/repos/Theano/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/Theano/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Theano/Theano/merges","archive_url":"https://api.github.com/repos/Theano/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Theano/Theano/downloads","issues_url":"https://api.github.com/repos/Theano/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/Theano/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/Theano/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/Theano/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Theano/Theano/labels{/name}","releases_url":"https://api.github.com/repos/Theano/Theano/releases{/id}","created_at":"2011-08-10T03:48:06Z","updated_at":"2015-07-16T22:20:15Z","pushed_at":"2015-07-17T15:19:42Z","git_url":"git://github.com/Theano/Theano.git","ssh_url":"git@github.com:Theano/Theano.git","clone_url":"https://github.com/Theano/Theano.git","svn_url":"https://github.com/Theano/Theano","homepage":"http://www.deeplearning.net/software/theano","size":56983,"stargazers_count":1737,"watchers_count":1737,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":635,"mirror_url":null,"open_issues_count":426,"forks":635,"open_issues":426,"watchers":1737,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3149"},"html":{"href":"https://github.com/Theano/Theano/pull/3149"},"issue":{"href":"https://api.github.com/repos/Theano/Theano/issues/3149"},"comments":{"href":"https://api.github.com/repos/Theano/Theano/issues/3149/comments"},"review_comments":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3149/comments"},"review_comment":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3149/commits"},"statuses":{"href":"https://api.github.com/repos/Theano/Theano/statuses/1193d4e57cb2e3dec85797f75f110fb8ee937406"}}}}