{"action":"created","comment":{"url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/comments/96157766","pull_request_review_id":16733376,"id":96157766,"diff_hunk":"@@ -38,9 +38,11 @@ NnetChainTrainer::NnetChainTrainer(const NnetChainTrainingOptions &opts,\n   KALDI_ASSERT(opts.nnet_config.momentum >= 0.0 &&\n                opts.nnet_config.max_param_change >= 0.0);\n   delta_nnet_ = nnet_->Copy();\n+  ScaleNnet(0.0, delta_nnet_);\n   bool is_gradient = false;  // setting this to true would disable the\n                              // natural-gradient updates.\n-  SetZero(is_gradient, delta_nnet_);\n+  if (is_gradient)","path":"src/nnet3/nnet-chain-training.cc","position":8,"original_position":8,"commit_id":"dd478abea79d9401a104ab897b0f71f246c28a4e","original_commit_id":"dd478abea79d9401a104ab897b0f71f246c28a4e","user":{"login":"danpovey","id":3298747,"avatar_url":"https://avatars.githubusercontent.com/u/3298747?v=3","gravatar_id":"","url":"https://api.github.com/users/danpovey","html_url":"https://github.com/danpovey","followers_url":"https://api.github.com/users/danpovey/followers","following_url":"https://api.github.com/users/danpovey/following{/other_user}","gists_url":"https://api.github.com/users/danpovey/gists{/gist_id}","starred_url":"https://api.github.com/users/danpovey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpovey/subscriptions","organizations_url":"https://api.github.com/users/danpovey/orgs","repos_url":"https://api.github.com/users/danpovey/repos","events_url":"https://api.github.com/users/danpovey/events{/privacy}","received_events_url":"https://api.github.com/users/danpovey/received_events","type":"User","site_admin":false},"body":"we just set is_gradient = false, so there is no need to call SetAsGradeintNnet().\r\nSometimes I declare a variable is_gradient = false just before SetZero() to document what the 'false' means.\r\n","created_at":"2017-01-16T02:40:09Z","updated_at":"2017-01-16T02:40:09Z","html_url":"https://github.com/kaldi-asr/kaldi/pull/1343#discussion_r96157766","pull_request_url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/1343","_links":{"self":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/comments/96157766"},"html":{"href":"https://github.com/kaldi-asr/kaldi/pull/1343#discussion_r96157766"},"pull_request":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/1343"}}},"pull_request":{"url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/1343","id":101621942,"html_url":"https://github.com/kaldi-asr/kaldi/pull/1343","diff_url":"https://github.com/kaldi-asr/kaldi/pull/1343.diff","patch_url":"https://github.com/kaldi-asr/kaldi/pull/1343.patch","issue_url":"https://api.github.com/repos/kaldi-asr/kaldi/issues/1343","number":1343,"state":"open","locked":false,"title":"Removing SetZero()","user":{"login":"freewym","id":3506322,"avatar_url":"https://avatars.githubusercontent.com/u/3506322?v=3","gravatar_id":"","url":"https://api.github.com/users/freewym","html_url":"https://github.com/freewym","followers_url":"https://api.github.com/users/freewym/followers","following_url":"https://api.github.com/users/freewym/following{/other_user}","gists_url":"https://api.github.com/users/freewym/gists{/gist_id}","starred_url":"https://api.github.com/users/freewym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freewym/subscriptions","organizations_url":"https://api.github.com/users/freewym/orgs","repos_url":"https://api.github.com/users/freewym/repos","events_url":"https://api.github.com/users/freewym/events{/privacy}","received_events_url":"https://api.github.com/users/freewym/received_events","type":"User","site_admin":false},"body":"resloved issue #1340.\r\n\r\nWill run a tdnn recipe for test","created_at":"2017-01-16T02:32:06Z","updated_at":"2017-01-16T02:40:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c2e903eac6ff13f14cbdb0fe342bca443de7e45","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/1343/commits","review_comments_url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/1343/comments","review_comment_url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaldi-asr/kaldi/issues/1343/comments","statuses_url":"https://api.github.com/repos/kaldi-asr/kaldi/statuses/dd478abea79d9401a104ab897b0f71f246c28a4e","head":{"label":"freewym:shortcut","ref":"shortcut","sha":"dd478abea79d9401a104ab897b0f71f246c28a4e","user":{"login":"freewym","id":3506322,"avatar_url":"https://avatars.githubusercontent.com/u/3506322?v=3","gravatar_id":"","url":"https://api.github.com/users/freewym","html_url":"https://github.com/freewym","followers_url":"https://api.github.com/users/freewym/followers","following_url":"https://api.github.com/users/freewym/following{/other_user}","gists_url":"https://api.github.com/users/freewym/gists{/gist_id}","starred_url":"https://api.github.com/users/freewym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freewym/subscriptions","organizations_url":"https://api.github.com/users/freewym/orgs","repos_url":"https://api.github.com/users/freewym/repos","events_url":"https://api.github.com/users/freewym/events{/privacy}","received_events_url":"https://api.github.com/users/freewym/received_events","type":"User","site_admin":false},"repo":{"id":41891891,"name":"kaldi","full_name":"freewym/kaldi","owner":{"login":"freewym","id":3506322,"avatar_url":"https://avatars.githubusercontent.com/u/3506322?v=3","gravatar_id":"","url":"https://api.github.com/users/freewym","html_url":"https://github.com/freewym","followers_url":"https://api.github.com/users/freewym/followers","following_url":"https://api.github.com/users/freewym/following{/other_user}","gists_url":"https://api.github.com/users/freewym/gists{/gist_id}","starred_url":"https://api.github.com/users/freewym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freewym/subscriptions","organizations_url":"https://api.github.com/users/freewym/orgs","repos_url":"https://api.github.com/users/freewym/repos","events_url":"https://api.github.com/users/freewym/events{/privacy}","received_events_url":"https://api.github.com/users/freewym/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/freewym/kaldi","description":"This is now the official location of the Kaldi project.","fork":true,"url":"https://api.github.com/repos/freewym/kaldi","forks_url":"https://api.github.com/repos/freewym/kaldi/forks","keys_url":"https://api.github.com/repos/freewym/kaldi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freewym/kaldi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freewym/kaldi/teams","hooks_url":"https://api.github.com/repos/freewym/kaldi/hooks","issue_events_url":"https://api.github.com/repos/freewym/kaldi/issues/events{/number}","events_url":"https://api.github.com/repos/freewym/kaldi/events","assignees_url":"https://api.github.com/repos/freewym/kaldi/assignees{/user}","branches_url":"https://api.github.com/repos/freewym/kaldi/branches{/branch}","tags_url":"https://api.github.com/repos/freewym/kaldi/tags","blobs_url":"https://api.github.com/repos/freewym/kaldi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freewym/kaldi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freewym/kaldi/git/refs{/sha}","trees_url":"https://api.github.com/repos/freewym/kaldi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freewym/kaldi/statuses/{sha}","languages_url":"https://api.github.com/repos/freewym/kaldi/languages","stargazers_url":"https://api.github.com/repos/freewym/kaldi/stargazers","contributors_url":"https://api.github.com/repos/freewym/kaldi/contributors","subscribers_url":"https://api.github.com/repos/freewym/kaldi/subscribers","subscription_url":"https://api.github.com/repos/freewym/kaldi/subscription","commits_url":"https://api.github.com/repos/freewym/kaldi/commits{/sha}","git_commits_url":"https://api.github.com/repos/freewym/kaldi/git/commits{/sha}","comments_url":"https://api.github.com/repos/freewym/kaldi/comments{/number}","issue_comment_url":"https://api.github.com/repos/freewym/kaldi/issues/comments{/number}","contents_url":"https://api.github.com/repos/freewym/kaldi/contents/{+path}","compare_url":"https://api.github.com/repos/freewym/kaldi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freewym/kaldi/merges","archive_url":"https://api.github.com/repos/freewym/kaldi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freewym/kaldi/downloads","issues_url":"https://api.github.com/repos/freewym/kaldi/issues{/number}","pulls_url":"https://api.github.com/repos/freewym/kaldi/pulls{/number}","milestones_url":"https://api.github.com/repos/freewym/kaldi/milestones{/number}","notifications_url":"https://api.github.com/repos/freewym/kaldi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freewym/kaldi/labels{/name}","releases_url":"https://api.github.com/repos/freewym/kaldi/releases{/id}","deployments_url":"https://api.github.com/repos/freewym/kaldi/deployments","created_at":"2015-09-04T01:18:16Z","updated_at":"2016-01-12T19:28:02Z","pushed_at":"2017-01-16T02:30:02Z","git_url":"git://github.com/freewym/kaldi.git","ssh_url":"git@github.com:freewym/kaldi.git","clone_url":"https://github.com/freewym/kaldi.git","svn_url":"https://github.com/freewym/kaldi","homepage":"http://kaldi-asr.org","size":104794,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"kaldi-asr:shortcut","ref":"shortcut","sha":"7f99ea4a5b30fce828da6a23ba0fc0415aa43e2f","user":{"login":"kaldi-asr","id":11650082,"avatar_url":"https://avatars.githubusercontent.com/u/11650082?v=3","gravatar_id":"","url":"https://api.github.com/users/kaldi-asr","html_url":"https://github.com/kaldi-asr","followers_url":"https://api.github.com/users/kaldi-asr/followers","following_url":"https://api.github.com/users/kaldi-asr/following{/other_user}","gists_url":"https://api.github.com/users/kaldi-asr/gists{/gist_id}","starred_url":"https://api.github.com/users/kaldi-asr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaldi-asr/subscriptions","organizations_url":"https://api.github.com/users/kaldi-asr/orgs","repos_url":"https://api.github.com/users/kaldi-asr/repos","events_url":"https://api.github.com/users/kaldi-asr/events{/privacy}","received_events_url":"https://api.github.com/users/kaldi-asr/received_events","type":"Organization","site_admin":false},"repo":{"id":34275045,"name":"kaldi","full_name":"kaldi-asr/kaldi","owner":{"login":"kaldi-asr","id":11650082,"avatar_url":"https://avatars.githubusercontent.com/u/11650082?v=3","gravatar_id":"","url":"https://api.github.com/users/kaldi-asr","html_url":"https://github.com/kaldi-asr","followers_url":"https://api.github.com/users/kaldi-asr/followers","following_url":"https://api.github.com/users/kaldi-asr/following{/other_user}","gists_url":"https://api.github.com/users/kaldi-asr/gists{/gist_id}","starred_url":"https://api.github.com/users/kaldi-asr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaldi-asr/subscriptions","organizations_url":"https://api.github.com/users/kaldi-asr/orgs","repos_url":"https://api.github.com/users/kaldi-asr/repos","events_url":"https://api.github.com/users/kaldi-asr/events{/privacy}","received_events_url":"https://api.github.com/users/kaldi-asr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaldi-asr/kaldi","description":"This is now the official location of the Kaldi project.","fork":false,"url":"https://api.github.com/repos/kaldi-asr/kaldi","forks_url":"https://api.github.com/repos/kaldi-asr/kaldi/forks","keys_url":"https://api.github.com/repos/kaldi-asr/kaldi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaldi-asr/kaldi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaldi-asr/kaldi/teams","hooks_url":"https://api.github.com/repos/kaldi-asr/kaldi/hooks","issue_events_url":"https://api.github.com/repos/kaldi-asr/kaldi/issues/events{/number}","events_url":"https://api.github.com/repos/kaldi-asr/kaldi/events","assignees_url":"https://api.github.com/repos/kaldi-asr/kaldi/assignees{/user}","branches_url":"https://api.github.com/repos/kaldi-asr/kaldi/branches{/branch}","tags_url":"https://api.github.com/repos/kaldi-asr/kaldi/tags","blobs_url":"https://api.github.com/repos/kaldi-asr/kaldi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaldi-asr/kaldi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaldi-asr/kaldi/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaldi-asr/kaldi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaldi-asr/kaldi/statuses/{sha}","languages_url":"https://api.github.com/repos/kaldi-asr/kaldi/languages","stargazers_url":"https://api.github.com/repos/kaldi-asr/kaldi/stargazers","contributors_url":"https://api.github.com/repos/kaldi-asr/kaldi/contributors","subscribers_url":"https://api.github.com/repos/kaldi-asr/kaldi/subscribers","subscription_url":"https://api.github.com/repos/kaldi-asr/kaldi/subscription","commits_url":"https://api.github.com/repos/kaldi-asr/kaldi/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaldi-asr/kaldi/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaldi-asr/kaldi/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaldi-asr/kaldi/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaldi-asr/kaldi/contents/{+path}","compare_url":"https://api.github.com/repos/kaldi-asr/kaldi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaldi-asr/kaldi/merges","archive_url":"https://api.github.com/repos/kaldi-asr/kaldi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaldi-asr/kaldi/downloads","issues_url":"https://api.github.com/repos/kaldi-asr/kaldi/issues{/number}","pulls_url":"https://api.github.com/repos/kaldi-asr/kaldi/pulls{/number}","milestones_url":"https://api.github.com/repos/kaldi-asr/kaldi/milestones{/number}","notifications_url":"https://api.github.com/repos/kaldi-asr/kaldi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaldi-asr/kaldi/labels{/name}","releases_url":"https://api.github.com/repos/kaldi-asr/kaldi/releases{/id}","deployments_url":"https://api.github.com/repos/kaldi-asr/kaldi/deployments","created_at":"2015-04-20T17:23:16Z","updated_at":"2017-01-15T16:30:08Z","pushed_at":"2017-01-16T02:32:06Z","git_url":"git://github.com/kaldi-asr/kaldi.git","ssh_url":"git@github.com:kaldi-asr/kaldi.git","clone_url":"https://github.com/kaldi-asr/kaldi.git","svn_url":"https://github.com/kaldi-asr/kaldi","homepage":"http://kaldi-asr.org","size":105068,"stargazers_count":1461,"watchers_count":1461,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":751,"mirror_url":null,"open_issues_count":110,"forks":751,"open_issues":110,"watchers":1461,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/1343"},"html":{"href":"https://github.com/kaldi-asr/kaldi/pull/1343"},"issue":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/issues/1343"},"comments":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/issues/1343/comments"},"review_comments":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/1343/comments"},"review_comment":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/pulls/1343/commits"},"statuses":{"href":"https://api.github.com/repos/kaldi-asr/kaldi/statuses/dd478abea79d9401a104ab897b0f71f246c28a4e"}}}}
{"actor":{"display_login":"danpovey"}}