{"action":"opened","number":5956,"pull_request":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/5956","id":177014868,"html_url":"https://github.com/pytorch/pytorch/pull/5956","diff_url":"https://github.com/pytorch/pytorch/pull/5956.diff","patch_url":"https://github.com/pytorch/pytorch/pull/5956.patch","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/5956","number":5956,"state":"open","locked":false,"title":"Implement `GroupNorm2D` from paper: `Group Normalization`","user":{"login":"DavexPro","id":10829987,"avatar_url":"https://avatars0.githubusercontent.com/u/10829987?v=4","gravatar_id":"","url":"https://api.github.com/users/DavexPro","html_url":"https://github.com/DavexPro","followers_url":"https://api.github.com/users/DavexPro/followers","following_url":"https://api.github.com/users/DavexPro/following{/other_user}","gists_url":"https://api.github.com/users/DavexPro/gists{/gist_id}","starred_url":"https://api.github.com/users/DavexPro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavexPro/subscriptions","organizations_url":"https://api.github.com/users/DavexPro/orgs","repos_url":"https://api.github.com/users/DavexPro/repos","events_url":"https://api.github.com/users/DavexPro/events{/privacy}","received_events_url":"https://api.github.com/users/DavexPro/received_events","type":"User","site_admin":false},"body":"Paper: [Group Normalization](https://arxiv.org/abs/1803.08494)\r\n\r\nMigrate the code from tf code given:\r\n```\r\ndef GroupNorm(x, gamma=1, beta=0.5, group=32, eps=1e-5):\r\n     # x: input features with shape [N,C,H,W]\r\n     # gamma, beta: scale and offset, with shape [1,C,1,1]\r\n     # G: number of groups for GN\r\n\r\n     N, C, H, W = x.shape\r\n     x = tf.reshape(x, [N, group, C // group, H, W])\r\n\r\n     mean, var = tf.nn.moments(x, [2, 3, 4], keep_dims=True)\r\n     x = (x - mean) / tf.sqrt(var + eps)\r\n\r\n     x = tf.reshape(x, [N, C, H, W])\r\n\r\n     return x * gamma + beta\r\n```\r\n\r\nI test it with VGG16 and CIFAR10, which it works well.","created_at":"2018-03-23T09:36:08Z","updated_at":"2018-03-23T09:36:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pytorch/pytorch/pulls/5956/commits","review_comments_url":"https://api.github.com/repos/pytorch/pytorch/pulls/5956/comments","review_comment_url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/5956/comments","statuses_url":"https://api.github.com/repos/pytorch/pytorch/statuses/ee8cda89987b675487dcd54c9a6760cca2fa5693","head":{"label":"DavexPro:master","ref":"master","sha":"ee8cda89987b675487dcd54c9a6760cca2fa5693","user":{"login":"DavexPro","id":10829987,"avatar_url":"https://avatars0.githubusercontent.com/u/10829987?v=4","gravatar_id":"","url":"https://api.github.com/users/DavexPro","html_url":"https://github.com/DavexPro","followers_url":"https://api.github.com/users/DavexPro/followers","following_url":"https://api.github.com/users/DavexPro/following{/other_user}","gists_url":"https://api.github.com/users/DavexPro/gists{/gist_id}","starred_url":"https://api.github.com/users/DavexPro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavexPro/subscriptions","organizations_url":"https://api.github.com/users/DavexPro/orgs","repos_url":"https://api.github.com/users/DavexPro/repos","events_url":"https://api.github.com/users/DavexPro/events{/privacy}","received_events_url":"https://api.github.com/users/DavexPro/received_events","type":"User","site_admin":false},"repo":{"id":126442060,"name":"pytorch","full_name":"DavexPro/pytorch","owner":{"login":"DavexPro","id":10829987,"avatar_url":"https://avatars0.githubusercontent.com/u/10829987?v=4","gravatar_id":"","url":"https://api.github.com/users/DavexPro","html_url":"https://github.com/DavexPro","followers_url":"https://api.github.com/users/DavexPro/followers","following_url":"https://api.github.com/users/DavexPro/following{/other_user}","gists_url":"https://api.github.com/users/DavexPro/gists{/gist_id}","starred_url":"https://api.github.com/users/DavexPro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavexPro/subscriptions","organizations_url":"https://api.github.com/users/DavexPro/orgs","repos_url":"https://api.github.com/users/DavexPro/repos","events_url":"https://api.github.com/users/DavexPro/events{/privacy}","received_events_url":"https://api.github.com/users/DavexPro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DavexPro/pytorch","description":"Tensors and Dynamic neural networks in Python  with strong GPU acceleration","fork":true,"url":"https://api.github.com/repos/DavexPro/pytorch","forks_url":"https://api.github.com/repos/DavexPro/pytorch/forks","keys_url":"https://api.github.com/repos/DavexPro/pytorch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DavexPro/pytorch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DavexPro/pytorch/teams","hooks_url":"https://api.github.com/repos/DavexPro/pytorch/hooks","issue_events_url":"https://api.github.com/repos/DavexPro/pytorch/issues/events{/number}","events_url":"https://api.github.com/repos/DavexPro/pytorch/events","assignees_url":"https://api.github.com/repos/DavexPro/pytorch/assignees{/user}","branches_url":"https://api.github.com/repos/DavexPro/pytorch/branches{/branch}","tags_url":"https://api.github.com/repos/DavexPro/pytorch/tags","blobs_url":"https://api.github.com/repos/DavexPro/pytorch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DavexPro/pytorch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DavexPro/pytorch/git/refs{/sha}","trees_url":"https://api.github.com/repos/DavexPro/pytorch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DavexPro/pytorch/statuses/{sha}","languages_url":"https://api.github.com/repos/DavexPro/pytorch/languages","stargazers_url":"https://api.github.com/repos/DavexPro/pytorch/stargazers","contributors_url":"https://api.github.com/repos/DavexPro/pytorch/contributors","subscribers_url":"https://api.github.com/repos/DavexPro/pytorch/subscribers","subscription_url":"https://api.github.com/repos/DavexPro/pytorch/subscription","commits_url":"https://api.github.com/repos/DavexPro/pytorch/commits{/sha}","git_commits_url":"https://api.github.com/repos/DavexPro/pytorch/git/commits{/sha}","comments_url":"https://api.github.com/repos/DavexPro/pytorch/comments{/number}","issue_comment_url":"https://api.github.com/repos/DavexPro/pytorch/issues/comments{/number}","contents_url":"https://api.github.com/repos/DavexPro/pytorch/contents/{+path}","compare_url":"https://api.github.com/repos/DavexPro/pytorch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DavexPro/pytorch/merges","archive_url":"https://api.github.com/repos/DavexPro/pytorch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DavexPro/pytorch/downloads","issues_url":"https://api.github.com/repos/DavexPro/pytorch/issues{/number}","pulls_url":"https://api.github.com/repos/DavexPro/pytorch/pulls{/number}","milestones_url":"https://api.github.com/repos/DavexPro/pytorch/milestones{/number}","notifications_url":"https://api.github.com/repos/DavexPro/pytorch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DavexPro/pytorch/labels{/name}","releases_url":"https://api.github.com/repos/DavexPro/pytorch/releases{/id}","deployments_url":"https://api.github.com/repos/DavexPro/pytorch/deployments","created_at":"2018-03-23T06:22:00Z","updated_at":"2018-03-23T09:29:03Z","pushed_at":"2018-03-23T09:28:58Z","git_url":"git://github.com/DavexPro/pytorch.git","ssh_url":"git@github.com:DavexPro/pytorch.git","clone_url":"https://github.com/DavexPro/pytorch.git","svn_url":"https://github.com/DavexPro/pytorch","homepage":"http://pytorch.org","size":25245,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pytorch:master","ref":"master","sha":"e3e0c34390dd858edf8fc528ee7c3a89a50a60f4","user":{"login":"pytorch","id":21003710,"avatar_url":"https://avatars3.githubusercontent.com/u/21003710?v=4","gravatar_id":"","url":"https://api.github.com/users/pytorch","html_url":"https://github.com/pytorch","followers_url":"https://api.github.com/users/pytorch/followers","following_url":"https://api.github.com/users/pytorch/following{/other_user}","gists_url":"https://api.github.com/users/pytorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pytorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytorch/subscriptions","organizations_url":"https://api.github.com/users/pytorch/orgs","repos_url":"https://api.github.com/users/pytorch/repos","events_url":"https://api.github.com/users/pytorch/events{/privacy}","received_events_url":"https://api.github.com/users/pytorch/received_events","type":"Organization","site_admin":false},"repo":{"id":65600975,"name":"pytorch","full_name":"pytorch/pytorch","owner":{"login":"pytorch","id":21003710,"avatar_url":"https://avatars3.githubusercontent.com/u/21003710?v=4","gravatar_id":"","url":"https://api.github.com/users/pytorch","html_url":"https://github.com/pytorch","followers_url":"https://api.github.com/users/pytorch/followers","following_url":"https://api.github.com/users/pytorch/following{/other_user}","gists_url":"https://api.github.com/users/pytorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pytorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytorch/subscriptions","organizations_url":"https://api.github.com/users/pytorch/orgs","repos_url":"https://api.github.com/users/pytorch/repos","events_url":"https://api.github.com/users/pytorch/events{/privacy}","received_events_url":"https://api.github.com/users/pytorch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pytorch/pytorch","description":"Tensors and Dynamic neural networks in Python  with strong GPU acceleration","fork":false,"url":"https://api.github.com/repos/pytorch/pytorch","forks_url":"https://api.github.com/repos/pytorch/pytorch/forks","keys_url":"https://api.github.com/repos/pytorch/pytorch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pytorch/pytorch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pytorch/pytorch/teams","hooks_url":"https://api.github.com/repos/pytorch/pytorch/hooks","issue_events_url":"https://api.github.com/repos/pytorch/pytorch/issues/events{/number}","events_url":"https://api.github.com/repos/pytorch/pytorch/events","assignees_url":"https://api.github.com/repos/pytorch/pytorch/assignees{/user}","branches_url":"https://api.github.com/repos/pytorch/pytorch/branches{/branch}","tags_url":"https://api.github.com/repos/pytorch/pytorch/tags","blobs_url":"https://api.github.com/repos/pytorch/pytorch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pytorch/pytorch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pytorch/pytorch/git/refs{/sha}","trees_url":"https://api.github.com/repos/pytorch/pytorch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pytorch/pytorch/statuses/{sha}","languages_url":"https://api.github.com/repos/pytorch/pytorch/languages","stargazers_url":"https://api.github.com/repos/pytorch/pytorch/stargazers","contributors_url":"https://api.github.com/repos/pytorch/pytorch/contributors","subscribers_url":"https://api.github.com/repos/pytorch/pytorch/subscribers","subscription_url":"https://api.github.com/repos/pytorch/pytorch/subscription","commits_url":"https://api.github.com/repos/pytorch/pytorch/commits{/sha}","git_commits_url":"https://api.github.com/repos/pytorch/pytorch/git/commits{/sha}","comments_url":"https://api.github.com/repos/pytorch/pytorch/comments{/number}","issue_comment_url":"https://api.github.com/repos/pytorch/pytorch/issues/comments{/number}","contents_url":"https://api.github.com/repos/pytorch/pytorch/contents/{+path}","compare_url":"https://api.github.com/repos/pytorch/pytorch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pytorch/pytorch/merges","archive_url":"https://api.github.com/repos/pytorch/pytorch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pytorch/pytorch/downloads","issues_url":"https://api.github.com/repos/pytorch/pytorch/issues{/number}","pulls_url":"https://api.github.com/repos/pytorch/pytorch/pulls{/number}","milestones_url":"https://api.github.com/repos/pytorch/pytorch/milestones{/number}","notifications_url":"https://api.github.com/repos/pytorch/pytorch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pytorch/pytorch/labels{/name}","releases_url":"https://api.github.com/repos/pytorch/pytorch/releases{/id}","deployments_url":"https://api.github.com/repos/pytorch/pytorch/deployments","created_at":"2016-08-13T05:26:41Z","updated_at":"2018-03-23T09:29:51Z","pushed_at":"2018-03-23T06:56:21Z","git_url":"git://github.com/pytorch/pytorch.git","ssh_url":"git@github.com:pytorch/pytorch.git","clone_url":"https://github.com/pytorch/pytorch.git","svn_url":"https://github.com/pytorch/pytorch","homepage":"http://pytorch.org","size":25245,"stargazers_count":13156,"watchers_count":13156,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2811,"mirror_url":null,"archived":false,"open_issues_count":812,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2811,"open_issues":812,"watchers":13156,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/5956"},"html":{"href":"https://github.com/pytorch/pytorch/pull/5956"},"issue":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/5956"},"comments":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/5956/comments"},"review_comments":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/5956/comments"},"review_comment":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/5956/commits"},"statuses":{"href":"https://api.github.com/repos/pytorch/pytorch/statuses/ee8cda89987b675487dcd54c9a6760cca2fa5693"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":61,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"DavexPro"}}