{"action":"created","comment":{"url":"https://api.github.com/repos/dmlc/mxnet/pulls/comments/67941342","id":67941342,"diff_hunk":"@@ -156,22 +157,22 @@ class CuDNNBatchNormOp : public Operator {\n         << \"use global statistics is not yet supported in CuDNNBatchNorm\";\n \n     Stream<gpu> *s = ctx.get_stream<gpu>();\n-    Tensor<gpu, 4> x = in_data[cudnnbatchnorm::kData].get_with_shape<gpu, 4, real_t>(shape_, s);\n-    Tensor<gpu, 4> dx = in_grad[cudnnbatchnorm::kData].get_with_shape<gpu, 4, real_t>(shape_, s);\n-    Tensor<gpu, 4> dy = out_grad[cudnnbatchnorm::kOut].get_with_shape<gpu, 4, real_t>(shape_, s);\n-    Tensor<gpu, 1> gamma =\n-      in_data[cudnnbatchnorm::kGamma].get_with_shape<gpu, 1, real_t>(Shape1(shape_[1]), s);\n-    Tensor<gpu, 1> dbeta =\n-      in_grad[cudnnbatchnorm::kBeta].get_with_shape<gpu, 1, real_t>(Shape1(shape_[1]), s);\n-    Tensor<gpu, 1> dgamma =\n-      in_grad[cudnnbatchnorm::kGamma].get_with_shape<gpu, 1, real_t>(Shape1(shape_[1]), s);\n-    Tensor<gpu, 1> save_mean =\n-      out_data[cudnnbatchnorm::kMean].get_with_shape<gpu, 1, real_t>(Shape1(shape_[1]), s);\n-    Tensor<gpu, 1> save_inv_var =\n-      out_data[cudnnbatchnorm::kInvVar].get_with_shape<gpu, 1, real_t>(Shape1(shape_[1]), s);\n-    float a = 1.0f;\n-    float b = 0.0f;\n-    float b_add = 1.0f;\n+    Tensor<gpu, 4, DType> x = in_data[cudnnbatchnorm::kData].get_with_shape<gpu, 4, DType>(shape_, s);\n+    Tensor<gpu, 4, DType> dx = in_grad[cudnnbatchnorm::kData].get_with_shape<gpu, 4, DType>(shape_, s);\n+    Tensor<gpu, 4, DType> dy = out_grad[cudnnbatchnorm::kOut].get_with_shape<gpu, 4, DType>(shape_, s);\n+    Tensor<gpu, 1, DType> gamma =\n+      in_data[cudnnbatchnorm::kGamma].get_with_shape<gpu, 1, DType>(Shape1(shape_[1]), s);\n+    Tensor<gpu, 1, DType> dbeta =\n+      in_grad[cudnnbatchnorm::kBeta].get_with_shape<gpu, 1, DType>(Shape1(shape_[1]), s);\n+    Tensor<gpu, 1, DType> dgamma =\n+      in_grad[cudnnbatchnorm::kGamma].get_with_shape<gpu, 1, DType>(Shape1(shape_[1]), s);\n+    Tensor<gpu, 1, DType> save_mean =\n+      out_data[cudnnbatchnorm::kMean].get_with_shape<gpu, 1, DType>(Shape1(shape_[1]), s);\n+    Tensor<gpu, 1, DType> save_inv_var =\n+      out_data[cudnnbatchnorm::kInvVar].get_with_shape<gpu, 1, DType>(Shape1(shape_[1]), s);\n+    DType a = static_cast<DType>(1.0f);","path":"src/operator/cudnn_batch_norm-inl.h","position":94,"original_position":94,"commit_id":"f1e3ef654476bfe834461461bea2f6220397aa67","original_commit_id":"f1e3ef654476bfe834461461bea2f6220397aa67","user":{"login":"vchuravy","id":145258,"avatar_url":"https://avatars.githubusercontent.com/u/145258?v=3","gravatar_id":"","url":"https://api.github.com/users/vchuravy","html_url":"https://github.com/vchuravy","followers_url":"https://api.github.com/users/vchuravy/followers","following_url":"https://api.github.com/users/vchuravy/following{/other_user}","gists_url":"https://api.github.com/users/vchuravy/gists{/gist_id}","starred_url":"https://api.github.com/users/vchuravy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vchuravy/subscriptions","organizations_url":"https://api.github.com/users/vchuravy/orgs","repos_url":"https://api.github.com/users/vchuravy/repos","events_url":"https://api.github.com/users/vchuravy/events{/privacy}","received_events_url":"https://api.github.com/users/vchuravy/received_events","type":"User","site_admin":false},"body":"Yes, I have to look at the call cudnn expects.","created_at":"2016-06-21T20:04:42Z","updated_at":"2016-06-21T20:04:42Z","html_url":"https://github.com/dmlc/mxnet/pull/2492#discussion_r67941342","pull_request_url":"https://api.github.com/repos/dmlc/mxnet/pulls/2492","_links":{"self":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/comments/67941342"},"html":{"href":"https://github.com/dmlc/mxnet/pull/2492#discussion_r67941342"},"pull_request":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/2492"}}},"pull_request":{"url":"https://api.github.com/repos/dmlc/mxnet/pulls/2492","id":74632729,"html_url":"https://github.com/dmlc/mxnet/pull/2492","diff_url":"https://github.com/dmlc/mxnet/pull/2492.diff","patch_url":"https://github.com/dmlc/mxnet/pull/2492.patch","issue_url":"https://api.github.com/repos/dmlc/mxnet/issues/2492","number":2492,"state":"open","locked":false,"title":"[RFC] Pooling, BatchNorm and LeakyReLu","user":{"login":"vchuravy","id":145258,"avatar_url":"https://avatars.githubusercontent.com/u/145258?v=3","gravatar_id":"","url":"https://api.github.com/users/vchuravy","html_url":"https://github.com/vchuravy","followers_url":"https://api.github.com/users/vchuravy/followers","following_url":"https://api.github.com/users/vchuravy/following{/other_user}","gists_url":"https://api.github.com/users/vchuravy/gists{/gist_id}","starred_url":"https://api.github.com/users/vchuravy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vchuravy/subscriptions","organizations_url":"https://api.github.com/users/vchuravy/orgs","repos_url":"https://api.github.com/users/vchuravy/repos","events_url":"https://api.github.com/users/vchuravy/events{/privacy}","received_events_url":"https://api.github.com/users/vchuravy/received_events","type":"User","site_admin":false},"body":"This consolidates three important operators needed for floating point support.\r\n\r\nOne general question is whether we should enable operators for all DTypes or only for floating point. Compare the implementation of BatchNorm to LeakyReLu for that.\r\n\r\nThis depends on https://github.com/dmlc/mshadow/pull/134\r\n\r\n@Godricly Thank you for BatchNorm. I merged my changes into the commit, but kept the main attribution for you.","created_at":"2016-06-21T15:25:08Z","updated_at":"2016-06-21T20:04:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5f7e2218307eaef70f66cdecf93202bb9afea80","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dmlc/mxnet/pulls/2492/commits","review_comments_url":"https://api.github.com/repos/dmlc/mxnet/pulls/2492/comments","review_comment_url":"https://api.github.com/repos/dmlc/mxnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dmlc/mxnet/issues/2492/comments","statuses_url":"https://api.github.com/repos/dmlc/mxnet/statuses/f1e3ef654476bfe834461461bea2f6220397aa67","head":{"label":"oist:vc/dt","ref":"vc/dt","sha":"f1e3ef654476bfe834461461bea2f6220397aa67","user":{"login":"oist","id":3096082,"avatar_url":"https://avatars.githubusercontent.com/u/3096082?v=3","gravatar_id":"","url":"https://api.github.com/users/oist","html_url":"https://github.com/oist","followers_url":"https://api.github.com/users/oist/followers","following_url":"https://api.github.com/users/oist/following{/other_user}","gists_url":"https://api.github.com/users/oist/gists{/gist_id}","starred_url":"https://api.github.com/users/oist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oist/subscriptions","organizations_url":"https://api.github.com/users/oist/orgs","repos_url":"https://api.github.com/users/oist/repos","events_url":"https://api.github.com/users/oist/events{/privacy}","received_events_url":"https://api.github.com/users/oist/received_events","type":"Organization","site_admin":false},"repo":{"id":47229641,"name":"mxnet","full_name":"oist/mxnet","owner":{"login":"oist","id":3096082,"avatar_url":"https://avatars.githubusercontent.com/u/3096082?v=3","gravatar_id":"","url":"https://api.github.com/users/oist","html_url":"https://github.com/oist","followers_url":"https://api.github.com/users/oist/followers","following_url":"https://api.github.com/users/oist/following{/other_user}","gists_url":"https://api.github.com/users/oist/gists{/gist_id}","starred_url":"https://api.github.com/users/oist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oist/subscriptions","organizations_url":"https://api.github.com/users/oist/orgs","repos_url":"https://api.github.com/users/oist/repos","events_url":"https://api.github.com/users/oist/events{/privacy}","received_events_url":"https://api.github.com/users/oist/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oist/mxnet","description":"Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Go, and more","fork":true,"url":"https://api.github.com/repos/oist/mxnet","forks_url":"https://api.github.com/repos/oist/mxnet/forks","keys_url":"https://api.github.com/repos/oist/mxnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oist/mxnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oist/mxnet/teams","hooks_url":"https://api.github.com/repos/oist/mxnet/hooks","issue_events_url":"https://api.github.com/repos/oist/mxnet/issues/events{/number}","events_url":"https://api.github.com/repos/oist/mxnet/events","assignees_url":"https://api.github.com/repos/oist/mxnet/assignees{/user}","branches_url":"https://api.github.com/repos/oist/mxnet/branches{/branch}","tags_url":"https://api.github.com/repos/oist/mxnet/tags","blobs_url":"https://api.github.com/repos/oist/mxnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oist/mxnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oist/mxnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/oist/mxnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oist/mxnet/statuses/{sha}","languages_url":"https://api.github.com/repos/oist/mxnet/languages","stargazers_url":"https://api.github.com/repos/oist/mxnet/stargazers","contributors_url":"https://api.github.com/repos/oist/mxnet/contributors","subscribers_url":"https://api.github.com/repos/oist/mxnet/subscribers","subscription_url":"https://api.github.com/repos/oist/mxnet/subscription","commits_url":"https://api.github.com/repos/oist/mxnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/oist/mxnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/oist/mxnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/oist/mxnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/oist/mxnet/contents/{+path}","compare_url":"https://api.github.com/repos/oist/mxnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oist/mxnet/merges","archive_url":"https://api.github.com/repos/oist/mxnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oist/mxnet/downloads","issues_url":"https://api.github.com/repos/oist/mxnet/issues{/number}","pulls_url":"https://api.github.com/repos/oist/mxnet/pulls{/number}","milestones_url":"https://api.github.com/repos/oist/mxnet/milestones{/number}","notifications_url":"https://api.github.com/repos/oist/mxnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oist/mxnet/labels{/name}","releases_url":"https://api.github.com/repos/oist/mxnet/releases{/id}","deployments_url":"https://api.github.com/repos/oist/mxnet/deployments","created_at":"2015-12-02T01:48:54Z","updated_at":"2015-12-02T01:48:56Z","pushed_at":"2016-06-21T15:17:57Z","git_url":"git://github.com/oist/mxnet.git","ssh_url":"git@github.com:oist/mxnet.git","clone_url":"https://github.com/oist/mxnet.git","svn_url":"https://github.com/oist/mxnet","homepage":"http://mxnet.rtfd.org","size":7942,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"dmlc:master","ref":"master","sha":"8e88cb7148fb50c1191b64b2bd3f2d33de023c05","user":{"login":"dmlc","id":11508361,"avatar_url":"https://avatars.githubusercontent.com/u/11508361?v=3","gravatar_id":"","url":"https://api.github.com/users/dmlc","html_url":"https://github.com/dmlc","followers_url":"https://api.github.com/users/dmlc/followers","following_url":"https://api.github.com/users/dmlc/following{/other_user}","gists_url":"https://api.github.com/users/dmlc/gists{/gist_id}","starred_url":"https://api.github.com/users/dmlc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmlc/subscriptions","organizations_url":"https://api.github.com/users/dmlc/orgs","repos_url":"https://api.github.com/users/dmlc/repos","events_url":"https://api.github.com/users/dmlc/events{/privacy}","received_events_url":"https://api.github.com/users/dmlc/received_events","type":"Organization","site_admin":false},"repo":{"id":34864402,"name":"mxnet","full_name":"dmlc/mxnet","owner":{"login":"dmlc","id":11508361,"avatar_url":"https://avatars.githubusercontent.com/u/11508361?v=3","gravatar_id":"","url":"https://api.github.com/users/dmlc","html_url":"https://github.com/dmlc","followers_url":"https://api.github.com/users/dmlc/followers","following_url":"https://api.github.com/users/dmlc/following{/other_user}","gists_url":"https://api.github.com/users/dmlc/gists{/gist_id}","starred_url":"https://api.github.com/users/dmlc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmlc/subscriptions","organizations_url":"https://api.github.com/users/dmlc/orgs","repos_url":"https://api.github.com/users/dmlc/repos","events_url":"https://api.github.com/users/dmlc/events{/privacy}","received_events_url":"https://api.github.com/users/dmlc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dmlc/mxnet","description":"Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more","fork":false,"url":"https://api.github.com/repos/dmlc/mxnet","forks_url":"https://api.github.com/repos/dmlc/mxnet/forks","keys_url":"https://api.github.com/repos/dmlc/mxnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmlc/mxnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmlc/mxnet/teams","hooks_url":"https://api.github.com/repos/dmlc/mxnet/hooks","issue_events_url":"https://api.github.com/repos/dmlc/mxnet/issues/events{/number}","events_url":"https://api.github.com/repos/dmlc/mxnet/events","assignees_url":"https://api.github.com/repos/dmlc/mxnet/assignees{/user}","branches_url":"https://api.github.com/repos/dmlc/mxnet/branches{/branch}","tags_url":"https://api.github.com/repos/dmlc/mxnet/tags","blobs_url":"https://api.github.com/repos/dmlc/mxnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmlc/mxnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmlc/mxnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmlc/mxnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmlc/mxnet/statuses/{sha}","languages_url":"https://api.github.com/repos/dmlc/mxnet/languages","stargazers_url":"https://api.github.com/repos/dmlc/mxnet/stargazers","contributors_url":"https://api.github.com/repos/dmlc/mxnet/contributors","subscribers_url":"https://api.github.com/repos/dmlc/mxnet/subscribers","subscription_url":"https://api.github.com/repos/dmlc/mxnet/subscription","commits_url":"https://api.github.com/repos/dmlc/mxnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmlc/mxnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmlc/mxnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmlc/mxnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmlc/mxnet/contents/{+path}","compare_url":"https://api.github.com/repos/dmlc/mxnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmlc/mxnet/merges","archive_url":"https://api.github.com/repos/dmlc/mxnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmlc/mxnet/downloads","issues_url":"https://api.github.com/repos/dmlc/mxnet/issues{/number}","pulls_url":"https://api.github.com/repos/dmlc/mxnet/pulls{/number}","milestones_url":"https://api.github.com/repos/dmlc/mxnet/milestones{/number}","notifications_url":"https://api.github.com/repos/dmlc/mxnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmlc/mxnet/labels{/name}","releases_url":"https://api.github.com/repos/dmlc/mxnet/releases{/id}","deployments_url":"https://api.github.com/repos/dmlc/mxnet/deployments","created_at":"2015-04-30T16:21:15Z","updated_at":"2016-06-21T20:02:34Z","pushed_at":"2016-06-21T17:48:25Z","git_url":"git://github.com/dmlc/mxnet.git","ssh_url":"git@github.com:dmlc/mxnet.git","clone_url":"https://github.com/dmlc/mxnet.git","svn_url":"https://github.com/dmlc/mxnet","homepage":"http://mxnet.rtfd.org","size":11173,"stargazers_count":4089,"watchers_count":4089,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1484,"mirror_url":null,"open_issues_count":354,"forks":1484,"open_issues":354,"watchers":4089,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/2492"},"html":{"href":"https://github.com/dmlc/mxnet/pull/2492"},"issue":{"href":"https://api.github.com/repos/dmlc/mxnet/issues/2492"},"comments":{"href":"https://api.github.com/repos/dmlc/mxnet/issues/2492/comments"},"review_comments":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/2492/comments"},"review_comment":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/2492/commits"},"statuses":{"href":"https://api.github.com/repos/dmlc/mxnet/statuses/f1e3ef654476bfe834461461bea2f6220397aa67"}}}}
{"actor":{"display_login":"vchuravy"}}