{"action":"opened","number":6,"pull_request":{"url":"https://api.github.com/repos/C14016112/project_atum/pulls/6","id":156497983,"html_url":"https://github.com/C14016112/project_atum/pull/6","diff_url":"https://github.com/C14016112/project_atum/pull/6.diff","patch_url":"https://github.com/C14016112/project_atum/pull/6.patch","issue_url":"https://api.github.com/repos/C14016112/project_atum/issues/6","number":6,"state":"open","locked":false,"title":"Fix slow execution bug","user":{"login":"EelaiWind","id":6024634,"avatar_url":"https://avatars0.githubusercontent.com/u/6024634?v=4","gravatar_id":"","url":"https://api.github.com/users/EelaiWind","html_url":"https://github.com/EelaiWind","followers_url":"https://api.github.com/users/EelaiWind/followers","following_url":"https://api.github.com/users/EelaiWind/following{/other_user}","gists_url":"https://api.github.com/users/EelaiWind/gists{/gist_id}","starred_url":"https://api.github.com/users/EelaiWind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EelaiWind/subscriptions","organizations_url":"https://api.github.com/users/EelaiWind/orgs","repos_url":"https://api.github.com/users/EelaiWind/repos","events_url":"https://api.github.com/users/EelaiWind/events{/privacy}","received_events_url":"https://api.github.com/users/EelaiWind/received_events","type":"User","site_admin":false},"body":"#### Description\r\nAfter commit [1eb5a...](https://github.com/C14016112/project_atum/commit/1eb5ace68c94afa43c15a5afd56f8793be4e29c8), the execution time increase a lot. \r\n\r\n#### Cause\r\n`Weight` doesn't return a **reference** when calling constant `[]` operator.\r\nIn `weight.h` [line 26](https://github.com/C14016112/project_atum/blob/master/src/weight.h#L26),  `inline const Matrix operator[] {...}` should be  `inline const Matrix &operator[]\r\n{...}`\r\n#### Before Bug Fix\r\n```\r\n$ time taskset -c 3  ./train | tee time_slow.log\r\nthread_number: 1\r\nmax_iteration: 50\r\npopulation: 100\r\nis load model: 0\r\nmodel: 16 64 64 64 1 \r\nes sigma: 0.1\r\nes alpha: 0.01\r\nthread number: 1\r\ncur_iteration 0, time: 0.653862, average reward 878.04\r\ncur_iteration 10, time: 6.05709, average reward 1004.74\r\ncur_iteration 20, time: 11.7375, average reward 1127.54\r\ncur_iteration 30, time: 18.0314, average reward 1365.84\r\ncur_iteration 40, time: 25.7872, average reward 1812.3\r\n\r\nreal    0m34.111s\r\nuser    0m33.628s\r\nsys     0m0.104s\r\n```\r\n#### After Bug Fix\r\n```\r\n$ time taskset -c 3  ./train | tee time_slow.log\r\nthread_number: 1\r\nmax_iteration: 50\r\npopulation: 100\r\nis load model: 0\r\nmodel: 16 64 64 64 1 \r\nes sigma: 0.1\r\nes alpha: 0.01\r\nthread number: 1\r\ncur_iteration 0, time: 0.447668, average reward 1032.64\r\ncur_iteration 10, time: 3.69123, average reward 1064.4\r\ncur_iteration 20, time: 6.98887, average reward 1101.58\r\ncur_iteration 30, time: 10.5861, average reward 1428.22\r\ncur_iteration 40, time: 14.409, average reward 1497.02\r\n\r\nreal    0m18.100s\r\nuser    0m17.952s\r\nsys     0m0.084s\r\n```","created_at":"2017-12-05T15:45:35Z","updated_at":"2017-12-05T15:45:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/C14016112/project_atum/pulls/6/commits","review_comments_url":"https://api.github.com/repos/C14016112/project_atum/pulls/6/comments","review_comment_url":"https://api.github.com/repos/C14016112/project_atum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/C14016112/project_atum/issues/6/comments","statuses_url":"https://api.github.com/repos/C14016112/project_atum/statuses/85d77575d27cb278cb3c49ed52d77ce43b5c2737","head":{"label":"EelaiWind:master","ref":"master","sha":"85d77575d27cb278cb3c49ed52d77ce43b5c2737","user":{"login":"EelaiWind","id":6024634,"avatar_url":"https://avatars0.githubusercontent.com/u/6024634?v=4","gravatar_id":"","url":"https://api.github.com/users/EelaiWind","html_url":"https://github.com/EelaiWind","followers_url":"https://api.github.com/users/EelaiWind/followers","following_url":"https://api.github.com/users/EelaiWind/following{/other_user}","gists_url":"https://api.github.com/users/EelaiWind/gists{/gist_id}","starred_url":"https://api.github.com/users/EelaiWind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EelaiWind/subscriptions","organizations_url":"https://api.github.com/users/EelaiWind/orgs","repos_url":"https://api.github.com/users/EelaiWind/repos","events_url":"https://api.github.com/users/EelaiWind/events{/privacy}","received_events_url":"https://api.github.com/users/EelaiWind/received_events","type":"User","site_admin":false},"repo":{"id":112147655,"name":"project_atum","full_name":"EelaiWind/project_atum","owner":{"login":"EelaiWind","id":6024634,"avatar_url":"https://avatars0.githubusercontent.com/u/6024634?v=4","gravatar_id":"","url":"https://api.github.com/users/EelaiWind","html_url":"https://github.com/EelaiWind","followers_url":"https://api.github.com/users/EelaiWind/followers","following_url":"https://api.github.com/users/EelaiWind/following{/other_user}","gists_url":"https://api.github.com/users/EelaiWind/gists{/gist_id}","starred_url":"https://api.github.com/users/EelaiWind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EelaiWind/subscriptions","organizations_url":"https://api.github.com/users/EelaiWind/orgs","repos_url":"https://api.github.com/users/EelaiWind/repos","events_url":"https://api.github.com/users/EelaiWind/events{/privacy}","received_events_url":"https://api.github.com/users/EelaiWind/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EelaiWind/project_atum","description":null,"fork":true,"url":"https://api.github.com/repos/EelaiWind/project_atum","forks_url":"https://api.github.com/repos/EelaiWind/project_atum/forks","keys_url":"https://api.github.com/repos/EelaiWind/project_atum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EelaiWind/project_atum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EelaiWind/project_atum/teams","hooks_url":"https://api.github.com/repos/EelaiWind/project_atum/hooks","issue_events_url":"https://api.github.com/repos/EelaiWind/project_atum/issues/events{/number}","events_url":"https://api.github.com/repos/EelaiWind/project_atum/events","assignees_url":"https://api.github.com/repos/EelaiWind/project_atum/assignees{/user}","branches_url":"https://api.github.com/repos/EelaiWind/project_atum/branches{/branch}","tags_url":"https://api.github.com/repos/EelaiWind/project_atum/tags","blobs_url":"https://api.github.com/repos/EelaiWind/project_atum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EelaiWind/project_atum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EelaiWind/project_atum/git/refs{/sha}","trees_url":"https://api.github.com/repos/EelaiWind/project_atum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EelaiWind/project_atum/statuses/{sha}","languages_url":"https://api.github.com/repos/EelaiWind/project_atum/languages","stargazers_url":"https://api.github.com/repos/EelaiWind/project_atum/stargazers","contributors_url":"https://api.github.com/repos/EelaiWind/project_atum/contributors","subscribers_url":"https://api.github.com/repos/EelaiWind/project_atum/subscribers","subscription_url":"https://api.github.com/repos/EelaiWind/project_atum/subscription","commits_url":"https://api.github.com/repos/EelaiWind/project_atum/commits{/sha}","git_commits_url":"https://api.github.com/repos/EelaiWind/project_atum/git/commits{/sha}","comments_url":"https://api.github.com/repos/EelaiWind/project_atum/comments{/number}","issue_comment_url":"https://api.github.com/repos/EelaiWind/project_atum/issues/comments{/number}","contents_url":"https://api.github.com/repos/EelaiWind/project_atum/contents/{+path}","compare_url":"https://api.github.com/repos/EelaiWind/project_atum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EelaiWind/project_atum/merges","archive_url":"https://api.github.com/repos/EelaiWind/project_atum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EelaiWind/project_atum/downloads","issues_url":"https://api.github.com/repos/EelaiWind/project_atum/issues{/number}","pulls_url":"https://api.github.com/repos/EelaiWind/project_atum/pulls{/number}","milestones_url":"https://api.github.com/repos/EelaiWind/project_atum/milestones{/number}","notifications_url":"https://api.github.com/repos/EelaiWind/project_atum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EelaiWind/project_atum/labels{/name}","releases_url":"https://api.github.com/repos/EelaiWind/project_atum/releases{/id}","deployments_url":"https://api.github.com/repos/EelaiWind/project_atum/deployments","created_at":"2017-11-27T04:37:08Z","updated_at":"2017-11-27T04:37:10Z","pushed_at":"2017-12-05T15:43:58Z","git_url":"git://github.com/EelaiWind/project_atum.git","ssh_url":"git@github.com:EelaiWind/project_atum.git","clone_url":"https://github.com/EelaiWind/project_atum.git","svn_url":"https://github.com/EelaiWind/project_atum","homepage":null,"size":62,"stargazers_count":0,"watchers_count":0,"language":"C++","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"C14016112:master","ref":"master","sha":"3a4d3c362949eac905e76181ad23b12af6f9febd","user":{"login":"C14016112","id":11360707,"avatar_url":"https://avatars0.githubusercontent.com/u/11360707?v=4","gravatar_id":"","url":"https://api.github.com/users/C14016112","html_url":"https://github.com/C14016112","followers_url":"https://api.github.com/users/C14016112/followers","following_url":"https://api.github.com/users/C14016112/following{/other_user}","gists_url":"https://api.github.com/users/C14016112/gists{/gist_id}","starred_url":"https://api.github.com/users/C14016112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C14016112/subscriptions","organizations_url":"https://api.github.com/users/C14016112/orgs","repos_url":"https://api.github.com/users/C14016112/repos","events_url":"https://api.github.com/users/C14016112/events{/privacy}","received_events_url":"https://api.github.com/users/C14016112/received_events","type":"User","site_admin":false},"repo":{"id":110695618,"name":"project_atum","full_name":"C14016112/project_atum","owner":{"login":"C14016112","id":11360707,"avatar_url":"https://avatars0.githubusercontent.com/u/11360707?v=4","gravatar_id":"","url":"https://api.github.com/users/C14016112","html_url":"https://github.com/C14016112","followers_url":"https://api.github.com/users/C14016112/followers","following_url":"https://api.github.com/users/C14016112/following{/other_user}","gists_url":"https://api.github.com/users/C14016112/gists{/gist_id}","starred_url":"https://api.github.com/users/C14016112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C14016112/subscriptions","organizations_url":"https://api.github.com/users/C14016112/orgs","repos_url":"https://api.github.com/users/C14016112/repos","events_url":"https://api.github.com/users/C14016112/events{/privacy}","received_events_url":"https://api.github.com/users/C14016112/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/C14016112/project_atum","description":null,"fork":false,"url":"https://api.github.com/repos/C14016112/project_atum","forks_url":"https://api.github.com/repos/C14016112/project_atum/forks","keys_url":"https://api.github.com/repos/C14016112/project_atum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/C14016112/project_atum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/C14016112/project_atum/teams","hooks_url":"https://api.github.com/repos/C14016112/project_atum/hooks","issue_events_url":"https://api.github.com/repos/C14016112/project_atum/issues/events{/number}","events_url":"https://api.github.com/repos/C14016112/project_atum/events","assignees_url":"https://api.github.com/repos/C14016112/project_atum/assignees{/user}","branches_url":"https://api.github.com/repos/C14016112/project_atum/branches{/branch}","tags_url":"https://api.github.com/repos/C14016112/project_atum/tags","blobs_url":"https://api.github.com/repos/C14016112/project_atum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/C14016112/project_atum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/C14016112/project_atum/git/refs{/sha}","trees_url":"https://api.github.com/repos/C14016112/project_atum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/C14016112/project_atum/statuses/{sha}","languages_url":"https://api.github.com/repos/C14016112/project_atum/languages","stargazers_url":"https://api.github.com/repos/C14016112/project_atum/stargazers","contributors_url":"https://api.github.com/repos/C14016112/project_atum/contributors","subscribers_url":"https://api.github.com/repos/C14016112/project_atum/subscribers","subscription_url":"https://api.github.com/repos/C14016112/project_atum/subscription","commits_url":"https://api.github.com/repos/C14016112/project_atum/commits{/sha}","git_commits_url":"https://api.github.com/repos/C14016112/project_atum/git/commits{/sha}","comments_url":"https://api.github.com/repos/C14016112/project_atum/comments{/number}","issue_comment_url":"https://api.github.com/repos/C14016112/project_atum/issues/comments{/number}","contents_url":"https://api.github.com/repos/C14016112/project_atum/contents/{+path}","compare_url":"https://api.github.com/repos/C14016112/project_atum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/C14016112/project_atum/merges","archive_url":"https://api.github.com/repos/C14016112/project_atum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/C14016112/project_atum/downloads","issues_url":"https://api.github.com/repos/C14016112/project_atum/issues{/number}","pulls_url":"https://api.github.com/repos/C14016112/project_atum/pulls{/number}","milestones_url":"https://api.github.com/repos/C14016112/project_atum/milestones{/number}","notifications_url":"https://api.github.com/repos/C14016112/project_atum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/C14016112/project_atum/labels{/name}","releases_url":"https://api.github.com/repos/C14016112/project_atum/releases{/id}","deployments_url":"https://api.github.com/repos/C14016112/project_atum/deployments","created_at":"2017-11-14T13:45:05Z","updated_at":"2017-11-14T13:49:29Z","pushed_at":"2017-12-05T14:21:06Z","git_url":"git://github.com/C14016112/project_atum.git","ssh_url":"git@github.com:C14016112/project_atum.git","clone_url":"https://github.com/C14016112/project_atum.git","svn_url":"https://github.com/C14016112/project_atum","homepage":null,"size":59,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/C14016112/project_atum/pulls/6"},"html":{"href":"https://github.com/C14016112/project_atum/pull/6"},"issue":{"href":"https://api.github.com/repos/C14016112/project_atum/issues/6"},"comments":{"href":"https://api.github.com/repos/C14016112/project_atum/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/C14016112/project_atum/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/C14016112/project_atum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/C14016112/project_atum/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/C14016112/project_atum/statuses/85d77575d27cb278cb3c49ed52d77ce43b5c2737"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"EelaiWind"}}