{"action":"created","comment":{"url":"https://api.github.com/repos/Lasagne/Lasagne/pulls/comments/28654050","id":28654050,"diff_hunk":"@@ -15,12 +17,58 @@\n \n \n class DropoutLayer(Layer):\n-    def __init__(self, incoming, p=0.5, rescale=True, **kwargs):\n-        super(DropoutLayer, self).__init__(incoming, **kwargs)\n+    \"\"\"Dropout layer [1]_,[2]_\n+\n+    Sets values to zero with probability p. See notes for disabling dropout\n+    during testing.\n+\n+    Parameters\n+    ----------\n+    input_layer : `Layer` instance\n+        The layer from which this layer will obtain its input\n+    p : float or scalar tensor\n+        The probability of setting a value to zero\n+\n+    Notes\n+    ----------\n+    The dropout layer is a regularizer that randomly sets input values to\n+    zero, see [1,2] for a why this might improve generalization.\n+    During training you should set deterministic to false and during\n+    testing you should set deterministic to true.\n+\n+    If rescale is true the input is scaled with input / (1-p) when\n+    deterministic is false, see [1,2] for further discussion. Note that this\n+    implementation scales the input at training time.\n+\n+    References\n+    ----------\n+    [1] Hinton, G., Srivastava, N., Krizhevsky, A., Sutskever, I.,\n+    Salakhutdinov, R. R. (2012).\n+    Improving neural networks by preventing co-adaptation of feature detectors.\n+    arXiv Preprint, 1207.0580(Hinton, Geoffrey E., et al.\n+\n+    [2] Srivastava Nitish, Hinton, G., Krizhevsky, A., Sutskever,\n+    I., & Salakhutdinov, R. R. (2014).\n+    Dropout: A Simple Way to Prevent Neural Networks from Overfitting.\n+    Journal of Machine Learning Research, 5(Jun)(2), 1929-1958.\n+    \"\"\"\n+    def __init__(self, input_layer, p=0.5, rescale=True):\n+        super(DropoutLayer, self).__init__(input_layer)\n         self.p = p\n         self.rescale = rescale\n \n-    def get_output_for(self, input, deterministic=False, **kwargs):\n+    def get_output_for(self, input, deterministic=False, *args, **kwargs):","path":"lasagne/layers/noise.py","position":54,"original_position":54,"commit_id":"2d4002ea15da3ce8832748889d8824566a4dc581","original_commit_id":"2d4002ea15da3ce8832748889d8824566a4dc581","user":{"login":"f0k","id":629706,"avatar_url":"https://avatars.githubusercontent.com/u/629706?v=3","gravatar_id":"","url":"https://api.github.com/users/f0k","html_url":"https://github.com/f0k","followers_url":"https://api.github.com/users/f0k/followers","following_url":"https://api.github.com/users/f0k/following{/other_user}","gists_url":"https://api.github.com/users/f0k/gists{/gist_id}","starred_url":"https://api.github.com/users/f0k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f0k/subscriptions","organizations_url":"https://api.github.com/users/f0k/orgs","repos_url":"https://api.github.com/users/f0k/repos","events_url":"https://api.github.com/users/f0k/events{/privacy}","received_events_url":"https://api.github.com/users/f0k/received_events","type":"User","site_admin":false},"body":"The `*args` have been removed some time ago. Are you working from the latest `master`?","created_at":"2015-04-19T15:55:54Z","updated_at":"2015-04-19T15:55:54Z","html_url":"https://github.com/Lasagne/Lasagne/pull/212#discussion_r28654050","pull_request_url":"https://api.github.com/repos/Lasagne/Lasagne/pulls/212","_links":{"self":{"href":"https://api.github.com/repos/Lasagne/Lasagne/pulls/comments/28654050"},"html":{"href":"https://github.com/Lasagne/Lasagne/pull/212#discussion_r28654050"},"pull_request":{"href":"https://api.github.com/repos/Lasagne/Lasagne/pulls/212"}}},"pull_request":{"url":"https://api.github.com/repos/Lasagne/Lasagne/pulls/212","id":33606425,"html_url":"https://github.com/Lasagne/Lasagne/pull/212","diff_url":"https://github.com/Lasagne/Lasagne/pull/212.diff","patch_url":"https://github.com/Lasagne/Lasagne/pull/212.patch","issue_url":"https://api.github.com/repos/Lasagne/Lasagne/issues/212","number":212,"state":"open","locked":false,"title":"add doc to noise.py","user":{"login":"skaae","id":2623134,"avatar_url":"https://avatars.githubusercontent.com/u/2623134?v=3","gravatar_id":"","url":"https://api.github.com/users/skaae","html_url":"https://github.com/skaae","followers_url":"https://api.github.com/users/skaae/followers","following_url":"https://api.github.com/users/skaae/following{/other_user}","gists_url":"https://api.github.com/users/skaae/gists{/gist_id}","starred_url":"https://api.github.com/users/skaae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skaae/subscriptions","organizations_url":"https://api.github.com/users/skaae/orgs","repos_url":"https://api.github.com/users/skaae/repos","events_url":"https://api.github.com/users/skaae/events{/privacy}","received_events_url":"https://api.github.com/users/skaae/received_events","type":"User","site_admin":false},"body":"adds documentation to the GuassianNoiseLayer and the DropoutLayer.\r\n\r\nI'm not sure what is the correct way to document `get_output_for` with `deterministic`, `rescale` etc keywords?","created_at":"2015-04-18T18:22:06Z","updated_at":"2015-04-19T15:55:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87659ac3b928c2363b8e051c5a914278c9d52ee7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Lasagne/Lasagne/pulls/212/commits","review_comments_url":"https://api.github.com/repos/Lasagne/Lasagne/pulls/212/comments","review_comment_url":"https://api.github.com/repos/Lasagne/Lasagne/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Lasagne/Lasagne/issues/212/comments","statuses_url":"https://api.github.com/repos/Lasagne/Lasagne/statuses/2d4002ea15da3ce8832748889d8824566a4dc581","head":{"label":"skaae:updates_noise","ref":"updates_noise","sha":"2d4002ea15da3ce8832748889d8824566a4dc581","user":{"login":"skaae","id":2623134,"avatar_url":"https://avatars.githubusercontent.com/u/2623134?v=3","gravatar_id":"","url":"https://api.github.com/users/skaae","html_url":"https://github.com/skaae","followers_url":"https://api.github.com/users/skaae/followers","following_url":"https://api.github.com/users/skaae/following{/other_user}","gists_url":"https://api.github.com/users/skaae/gists{/gist_id}","starred_url":"https://api.github.com/users/skaae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skaae/subscriptions","organizations_url":"https://api.github.com/users/skaae/orgs","repos_url":"https://api.github.com/users/skaae/repos","events_url":"https://api.github.com/users/skaae/events{/privacy}","received_events_url":"https://api.github.com/users/skaae/received_events","type":"User","site_admin":false},"repo":{"id":29256634,"name":"nntools","full_name":"skaae/nntools","owner":{"login":"skaae","id":2623134,"avatar_url":"https://avatars.githubusercontent.com/u/2623134?v=3","gravatar_id":"","url":"https://api.github.com/users/skaae","html_url":"https://github.com/skaae","followers_url":"https://api.github.com/users/skaae/followers","following_url":"https://api.github.com/users/skaae/following{/other_user}","gists_url":"https://api.github.com/users/skaae/gists{/gist_id}","starred_url":"https://api.github.com/users/skaae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skaae/subscriptions","organizations_url":"https://api.github.com/users/skaae/orgs","repos_url":"https://api.github.com/users/skaae/repos","events_url":"https://api.github.com/users/skaae/events{/privacy}","received_events_url":"https://api.github.com/users/skaae/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skaae/nntools","description":"Adding recurrent layers to lasagne","fork":true,"url":"https://api.github.com/repos/skaae/nntools","forks_url":"https://api.github.com/repos/skaae/nntools/forks","keys_url":"https://api.github.com/repos/skaae/nntools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skaae/nntools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skaae/nntools/teams","hooks_url":"https://api.github.com/repos/skaae/nntools/hooks","issue_events_url":"https://api.github.com/repos/skaae/nntools/issues/events{/number}","events_url":"https://api.github.com/repos/skaae/nntools/events","assignees_url":"https://api.github.com/repos/skaae/nntools/assignees{/user}","branches_url":"https://api.github.com/repos/skaae/nntools/branches{/branch}","tags_url":"https://api.github.com/repos/skaae/nntools/tags","blobs_url":"https://api.github.com/repos/skaae/nntools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skaae/nntools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skaae/nntools/git/refs{/sha}","trees_url":"https://api.github.com/repos/skaae/nntools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skaae/nntools/statuses/{sha}","languages_url":"https://api.github.com/repos/skaae/nntools/languages","stargazers_url":"https://api.github.com/repos/skaae/nntools/stargazers","contributors_url":"https://api.github.com/repos/skaae/nntools/contributors","subscribers_url":"https://api.github.com/repos/skaae/nntools/subscribers","subscription_url":"https://api.github.com/repos/skaae/nntools/subscription","commits_url":"https://api.github.com/repos/skaae/nntools/commits{/sha}","git_commits_url":"https://api.github.com/repos/skaae/nntools/git/commits{/sha}","comments_url":"https://api.github.com/repos/skaae/nntools/comments{/number}","issue_comment_url":"https://api.github.com/repos/skaae/nntools/issues/comments{/number}","contents_url":"https://api.github.com/repos/skaae/nntools/contents/{+path}","compare_url":"https://api.github.com/repos/skaae/nntools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skaae/nntools/merges","archive_url":"https://api.github.com/repos/skaae/nntools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skaae/nntools/downloads","issues_url":"https://api.github.com/repos/skaae/nntools/issues{/number}","pulls_url":"https://api.github.com/repos/skaae/nntools/pulls{/number}","milestones_url":"https://api.github.com/repos/skaae/nntools/milestones{/number}","notifications_url":"https://api.github.com/repos/skaae/nntools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skaae/nntools/labels{/name}","releases_url":"https://api.github.com/repos/skaae/nntools/releases{/id}","created_at":"2015-01-14T17:34:33Z","updated_at":"2015-04-17T10:05:33Z","pushed_at":"2015-04-19T15:18:21Z","git_url":"git://github.com/skaae/nntools.git","ssh_url":"git@github.com:skaae/nntools.git","clone_url":"https://github.com/skaae/nntools.git","svn_url":"https://github.com/skaae/nntools","homepage":"","size":23602,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":11,"default_branch":"master"}},"base":{"label":"Lasagne:master","ref":"master","sha":"363d3740b6e38372b212d2be19346b6b45f643d7","user":{"login":"Lasagne","id":11752110,"avatar_url":"https://avatars.githubusercontent.com/u/11752110?v=3","gravatar_id":"","url":"https://api.github.com/users/Lasagne","html_url":"https://github.com/Lasagne","followers_url":"https://api.github.com/users/Lasagne/followers","following_url":"https://api.github.com/users/Lasagne/following{/other_user}","gists_url":"https://api.github.com/users/Lasagne/gists{/gist_id}","starred_url":"https://api.github.com/users/Lasagne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lasagne/subscriptions","organizations_url":"https://api.github.com/users/Lasagne/orgs","repos_url":"https://api.github.com/users/Lasagne/repos","events_url":"https://api.github.com/users/Lasagne/events{/privacy}","received_events_url":"https://api.github.com/users/Lasagne/received_events","type":"Organization","site_admin":false},"repo":{"id":23924195,"name":"Lasagne","full_name":"Lasagne/Lasagne","owner":{"login":"Lasagne","id":11752110,"avatar_url":"https://avatars.githubusercontent.com/u/11752110?v=3","gravatar_id":"","url":"https://api.github.com/users/Lasagne","html_url":"https://github.com/Lasagne","followers_url":"https://api.github.com/users/Lasagne/followers","following_url":"https://api.github.com/users/Lasagne/following{/other_user}","gists_url":"https://api.github.com/users/Lasagne/gists{/gist_id}","starred_url":"https://api.github.com/users/Lasagne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lasagne/subscriptions","organizations_url":"https://api.github.com/users/Lasagne/orgs","repos_url":"https://api.github.com/users/Lasagne/repos","events_url":"https://api.github.com/users/Lasagne/events{/privacy}","received_events_url":"https://api.github.com/users/Lasagne/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Lasagne/Lasagne","description":"neural network tools for Theano","fork":false,"url":"https://api.github.com/repos/Lasagne/Lasagne","forks_url":"https://api.github.com/repos/Lasagne/Lasagne/forks","keys_url":"https://api.github.com/repos/Lasagne/Lasagne/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Lasagne/Lasagne/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Lasagne/Lasagne/teams","hooks_url":"https://api.github.com/repos/Lasagne/Lasagne/hooks","issue_events_url":"https://api.github.com/repos/Lasagne/Lasagne/issues/events{/number}","events_url":"https://api.github.com/repos/Lasagne/Lasagne/events","assignees_url":"https://api.github.com/repos/Lasagne/Lasagne/assignees{/user}","branches_url":"https://api.github.com/repos/Lasagne/Lasagne/branches{/branch}","tags_url":"https://api.github.com/repos/Lasagne/Lasagne/tags","blobs_url":"https://api.github.com/repos/Lasagne/Lasagne/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Lasagne/Lasagne/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Lasagne/Lasagne/git/refs{/sha}","trees_url":"https://api.github.com/repos/Lasagne/Lasagne/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Lasagne/Lasagne/statuses/{sha}","languages_url":"https://api.github.com/repos/Lasagne/Lasagne/languages","stargazers_url":"https://api.github.com/repos/Lasagne/Lasagne/stargazers","contributors_url":"https://api.github.com/repos/Lasagne/Lasagne/contributors","subscribers_url":"https://api.github.com/repos/Lasagne/Lasagne/subscribers","subscription_url":"https://api.github.com/repos/Lasagne/Lasagne/subscription","commits_url":"https://api.github.com/repos/Lasagne/Lasagne/commits{/sha}","git_commits_url":"https://api.github.com/repos/Lasagne/Lasagne/git/commits{/sha}","comments_url":"https://api.github.com/repos/Lasagne/Lasagne/comments{/number}","issue_comment_url":"https://api.github.com/repos/Lasagne/Lasagne/issues/comments{/number}","contents_url":"https://api.github.com/repos/Lasagne/Lasagne/contents/{+path}","compare_url":"https://api.github.com/repos/Lasagne/Lasagne/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Lasagne/Lasagne/merges","archive_url":"https://api.github.com/repos/Lasagne/Lasagne/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Lasagne/Lasagne/downloads","issues_url":"https://api.github.com/repos/Lasagne/Lasagne/issues{/number}","pulls_url":"https://api.github.com/repos/Lasagne/Lasagne/pulls{/number}","milestones_url":"https://api.github.com/repos/Lasagne/Lasagne/milestones{/number}","notifications_url":"https://api.github.com/repos/Lasagne/Lasagne/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Lasagne/Lasagne/labels{/name}","releases_url":"https://api.github.com/repos/Lasagne/Lasagne/releases{/id}","created_at":"2014-09-11T15:31:41Z","updated_at":"2015-04-19T13:24:00Z","pushed_at":"2015-04-19T15:18:21Z","git_url":"git://github.com/Lasagne/Lasagne.git","ssh_url":"git@github.com:Lasagne/Lasagne.git","clone_url":"https://github.com/Lasagne/Lasagne.git","svn_url":"https://github.com/Lasagne/Lasagne","homepage":"http://lasagne.readthedocs.org/","size":2595,"stargazers_count":428,"watchers_count":428,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":95,"mirror_url":null,"open_issues_count":42,"forks":95,"open_issues":42,"watchers":428,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Lasagne/Lasagne/pulls/212"},"html":{"href":"https://github.com/Lasagne/Lasagne/pull/212"},"issue":{"href":"https://api.github.com/repos/Lasagne/Lasagne/issues/212"},"comments":{"href":"https://api.github.com/repos/Lasagne/Lasagne/issues/212/comments"},"review_comments":{"href":"https://api.github.com/repos/Lasagne/Lasagne/pulls/212/comments"},"review_comment":{"href":"https://api.github.com/repos/Lasagne/Lasagne/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Lasagne/Lasagne/pulls/212/commits"},"statuses":{"href":"https://api.github.com/repos/Lasagne/Lasagne/statuses/2d4002ea15da3ce8832748889d8824566a4dc581"}}}}