{"action":"created","comment":{"url":"https://api.github.com/repos/pfnet/chainer/pulls/comments/87518375","pull_request_review_id":8129326,"id":87518375,"diff_hunk":"@@ -0,0 +1,86 @@\n+import math\n+\n+from chainer import cuda\n+from chainer.functions.noise import dropconnect\n+from chainer import initializers\n+from chainer import link\n+\n+\n+class Dropconnect(link.Link):\n+\n+    \"\"\"Fully-connected layer with dropconnect regularization.\n+\n+    Args:\n+        in_size (int): Dimension of input vectors. If None, parameter\n+            initialization will be deferred until the first forward data pass\n+            at which time the size will be determined.\n+        out_size (int): Dimension of output vectors.\n+        wscale (float): Scaling factor of the weight matrix.\n+        initialW (3-D array or None): Initial weight value.\n+            If ``None``, then this function uses ``wscale`` to initialize.\n+        initial_bias (2-D array, float or None): Initial bias value.\n+            If it is float, initial bias is filled with this value.\n+            If it is ``None``, bias is omitted.\n+        mask (:class:`numpy.ndarray` or cupy.ndarray):\n+            If ``None``, randomized dropconnect mask is generated.\n+            If not ``None``, this value is used as dropconnect mask.\n+            And scaling will not be executed.\n+            Then mask shape must be ``(M, N)``.\n+            Main purpose of latter option is debugging.\n+\n+    Attributes:\n+        W (~chainer.Variable): Weight parameter.\n+        b (~chainer.Variable): Bias parameter.\n+\n+    .. seealso:: :func:`~chainer.functions.dropconnect`\n+\n+    .. seealso::\n+        Li, W., Matthew Z., Sixin Z., Yann L., Rob F. (2013).\n+        Regularization of Neural Network using DropConnect.\n+        International Conference on Machine Learning.\n+        `URL <http://cs.nyu.edu/~wanli/dropc/>`_\n+    \"\"\"\n+\n+    def __init__(self, in_size, out_size, wscale=1,\n+                 ratio=.5, initialW=None, initial_bias=0, mask=None):","path":"chainer/links/activation/dropconnect.py","position":45,"original_position":45,"commit_id":"857ae64bbb49a221199ad67a0fb3ca90eb3dcc92","original_commit_id":"41b8999e9f0b3d722f62720d61e78ceae9aba726","user":{"login":"delta2323","id":407052,"avatar_url":"https://avatars.githubusercontent.com/u/407052?v=3","gravatar_id":"","url":"https://api.github.com/users/delta2323","html_url":"https://github.com/delta2323","followers_url":"https://api.github.com/users/delta2323/followers","following_url":"https://api.github.com/users/delta2323/following{/other_user}","gists_url":"https://api.github.com/users/delta2323/gists{/gist_id}","starred_url":"https://api.github.com/users/delta2323/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delta2323/subscriptions","organizations_url":"https://api.github.com/users/delta2323/orgs","repos_url":"https://api.github.com/users/delta2323/repos","events_url":"https://api.github.com/users/delta2323/events{/privacy}","received_events_url":"https://api.github.com/users/delta2323/received_events","type":"User","site_admin":false},"body":"One of the ways to realize this is to consider `mask` as an input Variable of `Dropconnect` Function as well as `x`, `W` and `b`. Could you consider the feasibility of this design?","created_at":"2016-11-11T00:45:05Z","updated_at":"2016-11-11T00:45:05Z","html_url":"https://github.com/pfnet/chainer/pull/1754#discussion_r87518375","pull_request_url":"https://api.github.com/repos/pfnet/chainer/pulls/1754","_links":{"self":{"href":"https://api.github.com/repos/pfnet/chainer/pulls/comments/87518375"},"html":{"href":"https://github.com/pfnet/chainer/pull/1754#discussion_r87518375"},"pull_request":{"href":"https://api.github.com/repos/pfnet/chainer/pulls/1754"}}},"pull_request":{"url":"https://api.github.com/repos/pfnet/chainer/pulls/1754","id":88611722,"html_url":"https://github.com/pfnet/chainer/pull/1754","diff_url":"https://github.com/pfnet/chainer/pull/1754.diff","patch_url":"https://github.com/pfnet/chainer/pull/1754.patch","issue_url":"https://api.github.com/repos/pfnet/chainer/issues/1754","number":1754,"state":"open","locked":false,"title":"Support dropconnect","user":{"login":"fukatani","id":8858287,"avatar_url":"https://avatars.githubusercontent.com/u/8858287?v=3","gravatar_id":"","url":"https://api.github.com/users/fukatani","html_url":"https://github.com/fukatani","followers_url":"https://api.github.com/users/fukatani/followers","following_url":"https://api.github.com/users/fukatani/following{/other_user}","gists_url":"https://api.github.com/users/fukatani/gists{/gist_id}","starred_url":"https://api.github.com/users/fukatani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fukatani/subscriptions","organizations_url":"https://api.github.com/users/fukatani/orgs","repos_url":"https://api.github.com/users/fukatani/repos","events_url":"https://api.github.com/users/fukatani/events{/privacy}","received_events_url":"https://api.github.com/users/fukatani/received_events","type":"User","site_admin":false},"body":"This PR is proposal for supporting dropconnect activation.\nDropconnect is generalization of dropout.\nIt drops weight element instead of input element.\n\nDeteil is here.\nhttp://cs.nyu.edu/~wanli/dropc/dropc.pdf\n","created_at":"2016-10-10T05:35:15Z","updated_at":"2016-11-11T00:45:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e7a8f31572307b4f13ee90c4ac7b0630e05d9d4","assignee":{"login":"delta2323","id":407052,"avatar_url":"https://avatars.githubusercontent.com/u/407052?v=3","gravatar_id":"","url":"https://api.github.com/users/delta2323","html_url":"https://github.com/delta2323","followers_url":"https://api.github.com/users/delta2323/followers","following_url":"https://api.github.com/users/delta2323/following{/other_user}","gists_url":"https://api.github.com/users/delta2323/gists{/gist_id}","starred_url":"https://api.github.com/users/delta2323/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delta2323/subscriptions","organizations_url":"https://api.github.com/users/delta2323/orgs","repos_url":"https://api.github.com/users/delta2323/repos","events_url":"https://api.github.com/users/delta2323/events{/privacy}","received_events_url":"https://api.github.com/users/delta2323/received_events","type":"User","site_admin":false},"assignees":[{"login":"delta2323","id":407052,"avatar_url":"https://avatars.githubusercontent.com/u/407052?v=3","gravatar_id":"","url":"https://api.github.com/users/delta2323","html_url":"https://github.com/delta2323","followers_url":"https://api.github.com/users/delta2323/followers","following_url":"https://api.github.com/users/delta2323/following{/other_user}","gists_url":"https://api.github.com/users/delta2323/gists{/gist_id}","starred_url":"https://api.github.com/users/delta2323/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delta2323/subscriptions","organizations_url":"https://api.github.com/users/delta2323/orgs","repos_url":"https://api.github.com/users/delta2323/repos","events_url":"https://api.github.com/users/delta2323/events{/privacy}","received_events_url":"https://api.github.com/users/delta2323/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pfnet/chainer/pulls/1754/commits","review_comments_url":"https://api.github.com/repos/pfnet/chainer/pulls/1754/comments","review_comment_url":"https://api.github.com/repos/pfnet/chainer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pfnet/chainer/issues/1754/comments","statuses_url":"https://api.github.com/repos/pfnet/chainer/statuses/857ae64bbb49a221199ad67a0fb3ca90eb3dcc92","head":{"label":"fukatani:dropconnect","ref":"dropconnect","sha":"857ae64bbb49a221199ad67a0fb3ca90eb3dcc92","user":{"login":"fukatani","id":8858287,"avatar_url":"https://avatars.githubusercontent.com/u/8858287?v=3","gravatar_id":"","url":"https://api.github.com/users/fukatani","html_url":"https://github.com/fukatani","followers_url":"https://api.github.com/users/fukatani/followers","following_url":"https://api.github.com/users/fukatani/following{/other_user}","gists_url":"https://api.github.com/users/fukatani/gists{/gist_id}","starred_url":"https://api.github.com/users/fukatani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fukatani/subscriptions","organizations_url":"https://api.github.com/users/fukatani/orgs","repos_url":"https://api.github.com/users/fukatani/repos","events_url":"https://api.github.com/users/fukatani/events{/privacy}","received_events_url":"https://api.github.com/users/fukatani/received_events","type":"User","site_admin":false},"repo":{"id":61127299,"name":"chainer","full_name":"fukatani/chainer","owner":{"login":"fukatani","id":8858287,"avatar_url":"https://avatars.githubusercontent.com/u/8858287?v=3","gravatar_id":"","url":"https://api.github.com/users/fukatani","html_url":"https://github.com/fukatani","followers_url":"https://api.github.com/users/fukatani/followers","following_url":"https://api.github.com/users/fukatani/following{/other_user}","gists_url":"https://api.github.com/users/fukatani/gists{/gist_id}","starred_url":"https://api.github.com/users/fukatani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fukatani/subscriptions","organizations_url":"https://api.github.com/users/fukatani/orgs","repos_url":"https://api.github.com/users/fukatani/repos","events_url":"https://api.github.com/users/fukatani/events{/privacy}","received_events_url":"https://api.github.com/users/fukatani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fukatani/chainer","description":"A flexible framework of neural networks for deep learning","fork":true,"url":"https://api.github.com/repos/fukatani/chainer","forks_url":"https://api.github.com/repos/fukatani/chainer/forks","keys_url":"https://api.github.com/repos/fukatani/chainer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fukatani/chainer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fukatani/chainer/teams","hooks_url":"https://api.github.com/repos/fukatani/chainer/hooks","issue_events_url":"https://api.github.com/repos/fukatani/chainer/issues/events{/number}","events_url":"https://api.github.com/repos/fukatani/chainer/events","assignees_url":"https://api.github.com/repos/fukatani/chainer/assignees{/user}","branches_url":"https://api.github.com/repos/fukatani/chainer/branches{/branch}","tags_url":"https://api.github.com/repos/fukatani/chainer/tags","blobs_url":"https://api.github.com/repos/fukatani/chainer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fukatani/chainer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fukatani/chainer/git/refs{/sha}","trees_url":"https://api.github.com/repos/fukatani/chainer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fukatani/chainer/statuses/{sha}","languages_url":"https://api.github.com/repos/fukatani/chainer/languages","stargazers_url":"https://api.github.com/repos/fukatani/chainer/stargazers","contributors_url":"https://api.github.com/repos/fukatani/chainer/contributors","subscribers_url":"https://api.github.com/repos/fukatani/chainer/subscribers","subscription_url":"https://api.github.com/repos/fukatani/chainer/subscription","commits_url":"https://api.github.com/repos/fukatani/chainer/commits{/sha}","git_commits_url":"https://api.github.com/repos/fukatani/chainer/git/commits{/sha}","comments_url":"https://api.github.com/repos/fukatani/chainer/comments{/number}","issue_comment_url":"https://api.github.com/repos/fukatani/chainer/issues/comments{/number}","contents_url":"https://api.github.com/repos/fukatani/chainer/contents/{+path}","compare_url":"https://api.github.com/repos/fukatani/chainer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fukatani/chainer/merges","archive_url":"https://api.github.com/repos/fukatani/chainer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fukatani/chainer/downloads","issues_url":"https://api.github.com/repos/fukatani/chainer/issues{/number}","pulls_url":"https://api.github.com/repos/fukatani/chainer/pulls{/number}","milestones_url":"https://api.github.com/repos/fukatani/chainer/milestones{/number}","notifications_url":"https://api.github.com/repos/fukatani/chainer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fukatani/chainer/labels{/name}","releases_url":"https://api.github.com/repos/fukatani/chainer/releases{/id}","deployments_url":"https://api.github.com/repos/fukatani/chainer/deployments","created_at":"2016-06-14T13:58:53Z","updated_at":"2016-08-12T08:41:07Z","pushed_at":"2016-11-10T14:26:32Z","git_url":"git://github.com/fukatani/chainer.git","ssh_url":"git@github.com:fukatani/chainer.git","clone_url":"https://github.com/fukatani/chainer.git","svn_url":"https://github.com/fukatani/chainer","homepage":"http://chainer.org","size":13103,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"pfnet:master","ref":"master","sha":"09a477ef435a2417d993411181a0a41672305421","user":{"login":"pfnet","id":9739572,"avatar_url":"https://avatars.githubusercontent.com/u/9739572?v=3","gravatar_id":"","url":"https://api.github.com/users/pfnet","html_url":"https://github.com/pfnet","followers_url":"https://api.github.com/users/pfnet/followers","following_url":"https://api.github.com/users/pfnet/following{/other_user}","gists_url":"https://api.github.com/users/pfnet/gists{/gist_id}","starred_url":"https://api.github.com/users/pfnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfnet/subscriptions","organizations_url":"https://api.github.com/users/pfnet/orgs","repos_url":"https://api.github.com/users/pfnet/repos","events_url":"https://api.github.com/users/pfnet/events{/privacy}","received_events_url":"https://api.github.com/users/pfnet/received_events","type":"Organization","site_admin":false},"repo":{"id":36914478,"name":"chainer","full_name":"pfnet/chainer","owner":{"login":"pfnet","id":9739572,"avatar_url":"https://avatars.githubusercontent.com/u/9739572?v=3","gravatar_id":"","url":"https://api.github.com/users/pfnet","html_url":"https://github.com/pfnet","followers_url":"https://api.github.com/users/pfnet/followers","following_url":"https://api.github.com/users/pfnet/following{/other_user}","gists_url":"https://api.github.com/users/pfnet/gists{/gist_id}","starred_url":"https://api.github.com/users/pfnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfnet/subscriptions","organizations_url":"https://api.github.com/users/pfnet/orgs","repos_url":"https://api.github.com/users/pfnet/repos","events_url":"https://api.github.com/users/pfnet/events{/privacy}","received_events_url":"https://api.github.com/users/pfnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pfnet/chainer","description":"A flexible framework of neural networks for deep learning","fork":false,"url":"https://api.github.com/repos/pfnet/chainer","forks_url":"https://api.github.com/repos/pfnet/chainer/forks","keys_url":"https://api.github.com/repos/pfnet/chainer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pfnet/chainer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pfnet/chainer/teams","hooks_url":"https://api.github.com/repos/pfnet/chainer/hooks","issue_events_url":"https://api.github.com/repos/pfnet/chainer/issues/events{/number}","events_url":"https://api.github.com/repos/pfnet/chainer/events","assignees_url":"https://api.github.com/repos/pfnet/chainer/assignees{/user}","branches_url":"https://api.github.com/repos/pfnet/chainer/branches{/branch}","tags_url":"https://api.github.com/repos/pfnet/chainer/tags","blobs_url":"https://api.github.com/repos/pfnet/chainer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pfnet/chainer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pfnet/chainer/git/refs{/sha}","trees_url":"https://api.github.com/repos/pfnet/chainer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pfnet/chainer/statuses/{sha}","languages_url":"https://api.github.com/repos/pfnet/chainer/languages","stargazers_url":"https://api.github.com/repos/pfnet/chainer/stargazers","contributors_url":"https://api.github.com/repos/pfnet/chainer/contributors","subscribers_url":"https://api.github.com/repos/pfnet/chainer/subscribers","subscription_url":"https://api.github.com/repos/pfnet/chainer/subscription","commits_url":"https://api.github.com/repos/pfnet/chainer/commits{/sha}","git_commits_url":"https://api.github.com/repos/pfnet/chainer/git/commits{/sha}","comments_url":"https://api.github.com/repos/pfnet/chainer/comments{/number}","issue_comment_url":"https://api.github.com/repos/pfnet/chainer/issues/comments{/number}","contents_url":"https://api.github.com/repos/pfnet/chainer/contents/{+path}","compare_url":"https://api.github.com/repos/pfnet/chainer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pfnet/chainer/merges","archive_url":"https://api.github.com/repos/pfnet/chainer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pfnet/chainer/downloads","issues_url":"https://api.github.com/repos/pfnet/chainer/issues{/number}","pulls_url":"https://api.github.com/repos/pfnet/chainer/pulls{/number}","milestones_url":"https://api.github.com/repos/pfnet/chainer/milestones{/number}","notifications_url":"https://api.github.com/repos/pfnet/chainer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pfnet/chainer/labels{/name}","releases_url":"https://api.github.com/repos/pfnet/chainer/releases{/id}","deployments_url":"https://api.github.com/repos/pfnet/chainer/deployments","created_at":"2015-06-05T05:50:37Z","updated_at":"2016-11-10T16:43:38Z","pushed_at":"2016-11-11T00:23:30Z","git_url":"git://github.com/pfnet/chainer.git","ssh_url":"git@github.com:pfnet/chainer.git","clone_url":"https://github.com/pfnet/chainer.git","svn_url":"https://github.com/pfnet/chainer","homepage":"http://chainer.org","size":33237,"stargazers_count":1771,"watchers_count":1771,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":452,"mirror_url":null,"open_issues_count":243,"forks":452,"open_issues":243,"watchers":1771,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pfnet/chainer/pulls/1754"},"html":{"href":"https://github.com/pfnet/chainer/pull/1754"},"issue":{"href":"https://api.github.com/repos/pfnet/chainer/issues/1754"},"comments":{"href":"https://api.github.com/repos/pfnet/chainer/issues/1754/comments"},"review_comments":{"href":"https://api.github.com/repos/pfnet/chainer/pulls/1754/comments"},"review_comment":{"href":"https://api.github.com/repos/pfnet/chainer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pfnet/chainer/pulls/1754/commits"},"statuses":{"href":"https://api.github.com/repos/pfnet/chainer/statuses/857ae64bbb49a221199ad67a0fb3ca90eb3dcc92"}}}}
{"actor":{"display_login":"delta2323"}}