{"action":"created","comment":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments/171508726","pull_request_review_id":100370118,"id":171508726,"diff_hunk":"@@ -32,7 +34,7 @@ class Threshold(Module):\n         >>> print(m(input))\n     \"\"\"\n \n-    def __init__(self, threshold, value, inplace=False):\n+    def __init__(self, threshold=0.0, value=0.0, inplace=False):","path":"torch/nn/modules/activation.py","position":14,"original_position":14,"commit_id":"66a85cf0cd3e66f3a5d1b9ef8ef896c9fec98779","original_commit_id":"db62804b96e6e6c0989174ae260106a6a0e06f54","user":{"login":"apaszke","id":4583066,"avatar_url":"https://avatars3.githubusercontent.com/u/4583066?v=4","gravatar_id":"","url":"https://api.github.com/users/apaszke","html_url":"https://github.com/apaszke","followers_url":"https://api.github.com/users/apaszke/followers","following_url":"https://api.github.com/users/apaszke/following{/other_user}","gists_url":"https://api.github.com/users/apaszke/gists{/gist_id}","starred_url":"https://api.github.com/users/apaszke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apaszke/subscriptions","organizations_url":"https://api.github.com/users/apaszke/orgs","repos_url":"https://api.github.com/users/apaszke/repos","events_url":"https://api.github.com/users/apaszke/events{/privacy}","received_events_url":"https://api.github.com/users/apaszke/received_events","type":"User","site_admin":false},"body":"I agree with @SsnL. Threshold is really a family of functions, and you need to choose the one you want explicitly. If you want the defaults (which are indeed commonly used), we picked it already for you under the name of `nn.ReLU`. In the hyperparameter optimization case, if you want to limit yourself to parameter-less nonlinearities, you should just exclude Threshold in favor of ReLU.","created_at":"2018-03-01T09:54:34Z","updated_at":"2018-03-01T09:54:34Z","html_url":"https://github.com/pytorch/pytorch/pull/5457#discussion_r171508726","pull_request_url":"https://api.github.com/repos/pytorch/pytorch/pulls/5457","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments/171508726"},"html":{"href":"https://github.com/pytorch/pytorch/pull/5457#discussion_r171508726"},"pull_request":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/5457"}},"in_reply_to_id":171328160},"pull_request":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/5457","id":171939235,"html_url":"https://github.com/pytorch/pytorch/pull/5457","diff_url":"https://github.com/pytorch/pytorch/pull/5457.diff","patch_url":"https://github.com/pytorch/pytorch/pull/5457.patch","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/5457","number":5457,"state":"open","locked":false,"title":"Documentation cleanup for activation functions","user":{"login":"pmitros","id":1427775,"avatar_url":"https://avatars0.githubusercontent.com/u/1427775?v=4","gravatar_id":"","url":"https://api.github.com/users/pmitros","html_url":"https://github.com/pmitros","followers_url":"https://api.github.com/users/pmitros/followers","following_url":"https://api.github.com/users/pmitros/following{/other_user}","gists_url":"https://api.github.com/users/pmitros/gists{/gist_id}","starred_url":"https://api.github.com/users/pmitros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmitros/subscriptions","organizations_url":"https://api.github.com/users/pmitros/orgs","repos_url":"https://api.github.com/users/pmitros/repos","events_url":"https://api.github.com/users/pmitros/events{/privacy}","received_events_url":"https://api.github.com/users/pmitros/received_events","type":"User","site_admin":false},"body":"This pull request improves documentation for the activation functions. \r\n\r\nSpecifically, it:\r\n\r\n* Splits activation functions into those which are a weighed sum+nonlinearity and the others\r\n* Adds an image for each activation function so one can tell at-a-glance what it does\r\n* Adds documentation for RReLU (which was previously undocumented)\r\n* Adds default parameters for 'Threshold' so that optimizers may instantiate it in the same way as any other activation function (and so we have a default for what to plot)\r\n\r\nPotential issues:\r\n\r\n* This is a first pull request to this project. I am unfamiliar with community conventions\r\n* I seem to be the first person adding images to docs. Are these where you'd like them?\r\n* Are the sizes appropriate? Should I be concerned about interactions with specific IDEs?\r\n* Are there better labels for the section headers? I considered using the language of generalized linear models and more background, but decided jargon may be less helpful to less experienced users","created_at":"2018-02-28T12:27:39Z","updated_at":"2018-03-01T09:54:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa75522cd1179b5a31eed016d2a5458370d1893c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pytorch/pytorch/pulls/5457/commits","review_comments_url":"https://api.github.com/repos/pytorch/pytorch/pulls/5457/comments","review_comment_url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/5457/comments","statuses_url":"https://api.github.com/repos/pytorch/pytorch/statuses/66a85cf0cd3e66f3a5d1b9ef8ef896c9fec98779","head":{"label":"pmitros:master","ref":"master","sha":"66a85cf0cd3e66f3a5d1b9ef8ef896c9fec98779","user":{"login":"pmitros","id":1427775,"avatar_url":"https://avatars0.githubusercontent.com/u/1427775?v=4","gravatar_id":"","url":"https://api.github.com/users/pmitros","html_url":"https://github.com/pmitros","followers_url":"https://api.github.com/users/pmitros/followers","following_url":"https://api.github.com/users/pmitros/following{/other_user}","gists_url":"https://api.github.com/users/pmitros/gists{/gist_id}","starred_url":"https://api.github.com/users/pmitros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmitros/subscriptions","organizations_url":"https://api.github.com/users/pmitros/orgs","repos_url":"https://api.github.com/users/pmitros/repos","events_url":"https://api.github.com/users/pmitros/events{/privacy}","received_events_url":"https://api.github.com/users/pmitros/received_events","type":"User","site_admin":false},"repo":{"id":123279203,"name":"pytorch","full_name":"pmitros/pytorch","owner":{"login":"pmitros","id":1427775,"avatar_url":"https://avatars0.githubusercontent.com/u/1427775?v=4","gravatar_id":"","url":"https://api.github.com/users/pmitros","html_url":"https://github.com/pmitros","followers_url":"https://api.github.com/users/pmitros/followers","following_url":"https://api.github.com/users/pmitros/following{/other_user}","gists_url":"https://api.github.com/users/pmitros/gists{/gist_id}","starred_url":"https://api.github.com/users/pmitros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmitros/subscriptions","organizations_url":"https://api.github.com/users/pmitros/orgs","repos_url":"https://api.github.com/users/pmitros/repos","events_url":"https://api.github.com/users/pmitros/events{/privacy}","received_events_url":"https://api.github.com/users/pmitros/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pmitros/pytorch","description":"Tensors and Dynamic neural networks in Python  with strong GPU acceleration","fork":true,"url":"https://api.github.com/repos/pmitros/pytorch","forks_url":"https://api.github.com/repos/pmitros/pytorch/forks","keys_url":"https://api.github.com/repos/pmitros/pytorch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pmitros/pytorch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pmitros/pytorch/teams","hooks_url":"https://api.github.com/repos/pmitros/pytorch/hooks","issue_events_url":"https://api.github.com/repos/pmitros/pytorch/issues/events{/number}","events_url":"https://api.github.com/repos/pmitros/pytorch/events","assignees_url":"https://api.github.com/repos/pmitros/pytorch/assignees{/user}","branches_url":"https://api.github.com/repos/pmitros/pytorch/branches{/branch}","tags_url":"https://api.github.com/repos/pmitros/pytorch/tags","blobs_url":"https://api.github.com/repos/pmitros/pytorch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pmitros/pytorch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pmitros/pytorch/git/refs{/sha}","trees_url":"https://api.github.com/repos/pmitros/pytorch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pmitros/pytorch/statuses/{sha}","languages_url":"https://api.github.com/repos/pmitros/pytorch/languages","stargazers_url":"https://api.github.com/repos/pmitros/pytorch/stargazers","contributors_url":"https://api.github.com/repos/pmitros/pytorch/contributors","subscribers_url":"https://api.github.com/repos/pmitros/pytorch/subscribers","subscription_url":"https://api.github.com/repos/pmitros/pytorch/subscription","commits_url":"https://api.github.com/repos/pmitros/pytorch/commits{/sha}","git_commits_url":"https://api.github.com/repos/pmitros/pytorch/git/commits{/sha}","comments_url":"https://api.github.com/repos/pmitros/pytorch/comments{/number}","issue_comment_url":"https://api.github.com/repos/pmitros/pytorch/issues/comments{/number}","contents_url":"https://api.github.com/repos/pmitros/pytorch/contents/{+path}","compare_url":"https://api.github.com/repos/pmitros/pytorch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pmitros/pytorch/merges","archive_url":"https://api.github.com/repos/pmitros/pytorch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pmitros/pytorch/downloads","issues_url":"https://api.github.com/repos/pmitros/pytorch/issues{/number}","pulls_url":"https://api.github.com/repos/pmitros/pytorch/pulls{/number}","milestones_url":"https://api.github.com/repos/pmitros/pytorch/milestones{/number}","notifications_url":"https://api.github.com/repos/pmitros/pytorch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pmitros/pytorch/labels{/name}","releases_url":"https://api.github.com/repos/pmitros/pytorch/releases{/id}","deployments_url":"https://api.github.com/repos/pmitros/pytorch/deployments","created_at":"2018-02-28T12:02:57Z","updated_at":"2018-02-28T12:03:03Z","pushed_at":"2018-02-28T18:14:26Z","git_url":"git://github.com/pmitros/pytorch.git","ssh_url":"git@github.com:pmitros/pytorch.git","clone_url":"https://github.com/pmitros/pytorch.git","svn_url":"https://github.com/pmitros/pytorch","homepage":"http://pytorch.org","size":23599,"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":"6ab33a820ce63f64d634f5915d9e76379be26e1a","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-01T08:27:38Z","pushed_at":"2018-03-01T09:35:46Z","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":23728,"stargazers_count":12602,"watchers_count":12602,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2654,"mirror_url":null,"archived":false,"open_issues_count":772,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2654,"open_issues":772,"watchers":12602,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/5457"},"html":{"href":"https://github.com/pytorch/pytorch/pull/5457"},"issue":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/5457"},"comments":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/5457/comments"},"review_comments":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/5457/comments"},"review_comment":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/5457/commits"},"statuses":{"href":"https://api.github.com/repos/pytorch/pytorch/statuses/66a85cf0cd3e66f3a5d1b9ef8ef896c9fec98779"}},"author_association":"NONE"}}
{"actor":{"display_login":"apaszke"}}