{"action":"closed","number":31,"pull_request":{"url":"https://api.github.com/repos/cazala/synaptic/pulls/31","id":34434746,"html_url":"https://github.com/cazala/synaptic/pull/31","diff_url":"https://github.com/cazala/synaptic/pull/31.diff","patch_url":"https://github.com/cazala/synaptic/pull/31.patch","issue_url":"https://api.github.com/repos/cazala/synaptic/issues/31","number":31,"state":"closed","locked":false,"title":"Parallelize neuron activation sequence in self-connected layers","user":{"login":"Sleepwalking","id":4531595,"avatar_url":"https://avatars.githubusercontent.com/u/4531595?v=3","gravatar_id":"","url":"https://api.github.com/users/Sleepwalking","html_url":"https://github.com/Sleepwalking","followers_url":"https://api.github.com/users/Sleepwalking/followers","following_url":"https://api.github.com/users/Sleepwalking/following{/other_user}","gists_url":"https://api.github.com/users/Sleepwalking/gists{/gist_id}","starred_url":"https://api.github.com/users/Sleepwalking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sleepwalking/subscriptions","organizations_url":"https://api.github.com/users/Sleepwalking/orgs","repos_url":"https://api.github.com/users/Sleepwalking/repos","events_url":"https://api.github.com/users/Sleepwalking/events{/privacy}","received_events_url":"https://api.github.com/users/Sleepwalking/received_events","type":"User","site_admin":false},"body":"This PR is **not** about parallelizing the library to run on multiple cores/gpu. It's about a bug in the sequence of activating neurons in self-connected layers.\r\n\r\nWe need to take great care when activating a self-connected layer (e.g. `memoryCell.project(memoryCell);`). Before this PR all neurons in such a layer are activated in sequence, which means **the former neurons always overwrite the activations fed to later neurons**, and the activations may mess up. The right way to do this is to **update the activations only after all neurons in the layer have been activated**.\r\n\r\nThis PR fixes the bug in forward propagation, including hardcoder (standalone hardcoder is fixed but not tested yet). I'm not sure yet if similar bug exists in back propagation. We have to fix these bugs if we want to parallelize (multi-corelize) it because we don't want resource conflicts.\r\n\r\nThe fixed codes pass the DSR task as well as the [timing task](https://github.com/cazala/synaptic/issues/30#issuecomment-97624779).\r\n\r\nNotable changes:\r\n* `Neuron` got two new properties: `.newactivation` and `.inselfconnectedlayer`\r\n* `update_sentences` was added to the hardcoder which contains a few lines like this, `Neuron.activation = Neuron.newactivation;`","created_at":"2015-04-30T07:31:41Z","updated_at":"2015-05-01T03:09:34Z","closed_at":"2015-05-01T03:09:34Z","merged_at":"2015-05-01T03:09:34Z","merge_commit_sha":"ccfb999c9c965611c00393d6b0c66b2bad94dbfe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cazala/synaptic/pulls/31/commits","review_comments_url":"https://api.github.com/repos/cazala/synaptic/pulls/31/comments","review_comment_url":"https://api.github.com/repos/cazala/synaptic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cazala/synaptic/issues/31/comments","statuses_url":"https://api.github.com/repos/cazala/synaptic/statuses/418610215efe48af88581dd96da18931de8f01c9","head":{"label":"Sleepwalking:master","ref":"master","sha":"418610215efe48af88581dd96da18931de8f01c9","user":{"login":"Sleepwalking","id":4531595,"avatar_url":"https://avatars.githubusercontent.com/u/4531595?v=3","gravatar_id":"","url":"https://api.github.com/users/Sleepwalking","html_url":"https://github.com/Sleepwalking","followers_url":"https://api.github.com/users/Sleepwalking/followers","following_url":"https://api.github.com/users/Sleepwalking/following{/other_user}","gists_url":"https://api.github.com/users/Sleepwalking/gists{/gist_id}","starred_url":"https://api.github.com/users/Sleepwalking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sleepwalking/subscriptions","organizations_url":"https://api.github.com/users/Sleepwalking/orgs","repos_url":"https://api.github.com/users/Sleepwalking/repos","events_url":"https://api.github.com/users/Sleepwalking/events{/privacy}","received_events_url":"https://api.github.com/users/Sleepwalking/received_events","type":"User","site_admin":false},"repo":{"id":34031080,"name":"synaptic","full_name":"Sleepwalking/synaptic","owner":{"login":"Sleepwalking","id":4531595,"avatar_url":"https://avatars.githubusercontent.com/u/4531595?v=3","gravatar_id":"","url":"https://api.github.com/users/Sleepwalking","html_url":"https://github.com/Sleepwalking","followers_url":"https://api.github.com/users/Sleepwalking/followers","following_url":"https://api.github.com/users/Sleepwalking/following{/other_user}","gists_url":"https://api.github.com/users/Sleepwalking/gists{/gist_id}","starred_url":"https://api.github.com/users/Sleepwalking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sleepwalking/subscriptions","organizations_url":"https://api.github.com/users/Sleepwalking/orgs","repos_url":"https://api.github.com/users/Sleepwalking/repos","events_url":"https://api.github.com/users/Sleepwalking/events{/privacy}","received_events_url":"https://api.github.com/users/Sleepwalking/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sleepwalking/synaptic","description":"architecture-free neural network library for node.js and the browser","fork":true,"url":"https://api.github.com/repos/Sleepwalking/synaptic","forks_url":"https://api.github.com/repos/Sleepwalking/synaptic/forks","keys_url":"https://api.github.com/repos/Sleepwalking/synaptic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sleepwalking/synaptic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sleepwalking/synaptic/teams","hooks_url":"https://api.github.com/repos/Sleepwalking/synaptic/hooks","issue_events_url":"https://api.github.com/repos/Sleepwalking/synaptic/issues/events{/number}","events_url":"https://api.github.com/repos/Sleepwalking/synaptic/events","assignees_url":"https://api.github.com/repos/Sleepwalking/synaptic/assignees{/user}","branches_url":"https://api.github.com/repos/Sleepwalking/synaptic/branches{/branch}","tags_url":"https://api.github.com/repos/Sleepwalking/synaptic/tags","blobs_url":"https://api.github.com/repos/Sleepwalking/synaptic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sleepwalking/synaptic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sleepwalking/synaptic/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sleepwalking/synaptic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sleepwalking/synaptic/statuses/{sha}","languages_url":"https://api.github.com/repos/Sleepwalking/synaptic/languages","stargazers_url":"https://api.github.com/repos/Sleepwalking/synaptic/stargazers","contributors_url":"https://api.github.com/repos/Sleepwalking/synaptic/contributors","subscribers_url":"https://api.github.com/repos/Sleepwalking/synaptic/subscribers","subscription_url":"https://api.github.com/repos/Sleepwalking/synaptic/subscription","commits_url":"https://api.github.com/repos/Sleepwalking/synaptic/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sleepwalking/synaptic/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sleepwalking/synaptic/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sleepwalking/synaptic/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sleepwalking/synaptic/contents/{+path}","compare_url":"https://api.github.com/repos/Sleepwalking/synaptic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sleepwalking/synaptic/merges","archive_url":"https://api.github.com/repos/Sleepwalking/synaptic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sleepwalking/synaptic/downloads","issues_url":"https://api.github.com/repos/Sleepwalking/synaptic/issues{/number}","pulls_url":"https://api.github.com/repos/Sleepwalking/synaptic/pulls{/number}","milestones_url":"https://api.github.com/repos/Sleepwalking/synaptic/milestones{/number}","notifications_url":"https://api.github.com/repos/Sleepwalking/synaptic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sleepwalking/synaptic/labels{/name}","releases_url":"https://api.github.com/repos/Sleepwalking/synaptic/releases{/id}","created_at":"2015-04-16T02:56:52Z","updated_at":"2015-05-01T02:50:11Z","pushed_at":"2015-05-01T02:50:10Z","git_url":"git://github.com/Sleepwalking/synaptic.git","ssh_url":"git@github.com:Sleepwalking/synaptic.git","clone_url":"https://github.com/Sleepwalking/synaptic.git","svn_url":"https://github.com/Sleepwalking/synaptic","homepage":"http://synaptic.juancazala.com","size":3287,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cazala:master","ref":"master","sha":"00809d2fd217e85886c9365199703218f1dcb1b2","user":{"login":"cazala","id":2781777,"avatar_url":"https://avatars.githubusercontent.com/u/2781777?v=3","gravatar_id":"","url":"https://api.github.com/users/cazala","html_url":"https://github.com/cazala","followers_url":"https://api.github.com/users/cazala/followers","following_url":"https://api.github.com/users/cazala/following{/other_user}","gists_url":"https://api.github.com/users/cazala/gists{/gist_id}","starred_url":"https://api.github.com/users/cazala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cazala/subscriptions","organizations_url":"https://api.github.com/users/cazala/orgs","repos_url":"https://api.github.com/users/cazala/repos","events_url":"https://api.github.com/users/cazala/events{/privacy}","received_events_url":"https://api.github.com/users/cazala/received_events","type":"User","site_admin":false},"repo":{"id":24649388,"name":"synaptic","full_name":"cazala/synaptic","owner":{"login":"cazala","id":2781777,"avatar_url":"https://avatars.githubusercontent.com/u/2781777?v=3","gravatar_id":"","url":"https://api.github.com/users/cazala","html_url":"https://github.com/cazala","followers_url":"https://api.github.com/users/cazala/followers","following_url":"https://api.github.com/users/cazala/following{/other_user}","gists_url":"https://api.github.com/users/cazala/gists{/gist_id}","starred_url":"https://api.github.com/users/cazala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cazala/subscriptions","organizations_url":"https://api.github.com/users/cazala/orgs","repos_url":"https://api.github.com/users/cazala/repos","events_url":"https://api.github.com/users/cazala/events{/privacy}","received_events_url":"https://api.github.com/users/cazala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cazala/synaptic","description":"architecture-free neural network library for node.js and the browser","fork":false,"url":"https://api.github.com/repos/cazala/synaptic","forks_url":"https://api.github.com/repos/cazala/synaptic/forks","keys_url":"https://api.github.com/repos/cazala/synaptic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cazala/synaptic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cazala/synaptic/teams","hooks_url":"https://api.github.com/repos/cazala/synaptic/hooks","issue_events_url":"https://api.github.com/repos/cazala/synaptic/issues/events{/number}","events_url":"https://api.github.com/repos/cazala/synaptic/events","assignees_url":"https://api.github.com/repos/cazala/synaptic/assignees{/user}","branches_url":"https://api.github.com/repos/cazala/synaptic/branches{/branch}","tags_url":"https://api.github.com/repos/cazala/synaptic/tags","blobs_url":"https://api.github.com/repos/cazala/synaptic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cazala/synaptic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cazala/synaptic/git/refs{/sha}","trees_url":"https://api.github.com/repos/cazala/synaptic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cazala/synaptic/statuses/{sha}","languages_url":"https://api.github.com/repos/cazala/synaptic/languages","stargazers_url":"https://api.github.com/repos/cazala/synaptic/stargazers","contributors_url":"https://api.github.com/repos/cazala/synaptic/contributors","subscribers_url":"https://api.github.com/repos/cazala/synaptic/subscribers","subscription_url":"https://api.github.com/repos/cazala/synaptic/subscription","commits_url":"https://api.github.com/repos/cazala/synaptic/commits{/sha}","git_commits_url":"https://api.github.com/repos/cazala/synaptic/git/commits{/sha}","comments_url":"https://api.github.com/repos/cazala/synaptic/comments{/number}","issue_comment_url":"https://api.github.com/repos/cazala/synaptic/issues/comments{/number}","contents_url":"https://api.github.com/repos/cazala/synaptic/contents/{+path}","compare_url":"https://api.github.com/repos/cazala/synaptic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cazala/synaptic/merges","archive_url":"https://api.github.com/repos/cazala/synaptic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cazala/synaptic/downloads","issues_url":"https://api.github.com/repos/cazala/synaptic/issues{/number}","pulls_url":"https://api.github.com/repos/cazala/synaptic/pulls{/number}","milestones_url":"https://api.github.com/repos/cazala/synaptic/milestones{/number}","notifications_url":"https://api.github.com/repos/cazala/synaptic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cazala/synaptic/labels{/name}","releases_url":"https://api.github.com/repos/cazala/synaptic/releases{/id}","created_at":"2014-09-30T18:07:03Z","updated_at":"2015-04-29T13:51:51Z","pushed_at":"2015-05-01T03:09:34Z","git_url":"git://github.com/cazala/synaptic.git","ssh_url":"git@github.com:cazala/synaptic.git","clone_url":"https://github.com/cazala/synaptic.git","svn_url":"https://github.com/cazala/synaptic","homepage":"http://synaptic.juancazala.com","size":4363,"stargazers_count":1336,"watchers_count":1336,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":84,"mirror_url":null,"open_issues_count":8,"forks":84,"open_issues":8,"watchers":1336,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cazala/synaptic/pulls/31"},"html":{"href":"https://github.com/cazala/synaptic/pull/31"},"issue":{"href":"https://api.github.com/repos/cazala/synaptic/issues/31"},"comments":{"href":"https://api.github.com/repos/cazala/synaptic/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/cazala/synaptic/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/cazala/synaptic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cazala/synaptic/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/cazala/synaptic/statuses/418610215efe48af88581dd96da18931de8f01c9"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"cazala","id":2781777,"avatar_url":"https://avatars.githubusercontent.com/u/2781777?v=3","gravatar_id":"","url":"https://api.github.com/users/cazala","html_url":"https://github.com/cazala","followers_url":"https://api.github.com/users/cazala/followers","following_url":"https://api.github.com/users/cazala/following{/other_user}","gists_url":"https://api.github.com/users/cazala/gists{/gist_id}","starred_url":"https://api.github.com/users/cazala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cazala/subscriptions","organizations_url":"https://api.github.com/users/cazala/orgs","repos_url":"https://api.github.com/users/cazala/repos","events_url":"https://api.github.com/users/cazala/events{/privacy}","received_events_url":"https://api.github.com/users/cazala/received_events","type":"User","site_admin":false},"comments":24,"review_comments":0,"commits":3,"additions":76,"deletions":5,"changed_files":3}}