{"action":"created","issue":{"url":"https://api.github.com/repos/nengo/nengo/issues/553","repository_url":"https://api.github.com/repos/nengo/nengo","labels_url":"https://api.github.com/repos/nengo/nengo/issues/553/labels{/name}","comments_url":"https://api.github.com/repos/nengo/nengo/issues/553/comments","events_url":"https://api.github.com/repos/nengo/nengo/issues/553/events","html_url":"https://github.com/nengo/nengo/pull/553","id":49321354,"number":553,"title":"Using generic python function to specify learning rule","user":{"login":"drasmuss","id":1952220,"avatar_url":"https://avatars.githubusercontent.com/u/1952220?v=3","gravatar_id":"","url":"https://api.github.com/users/drasmuss","html_url":"https://github.com/drasmuss","followers_url":"https://api.github.com/users/drasmuss/followers","following_url":"https://api.github.com/users/drasmuss/following{/other_user}","gists_url":"https://api.github.com/users/drasmuss/gists{/gist_id}","starred_url":"https://api.github.com/users/drasmuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drasmuss/subscriptions","organizations_url":"https://api.github.com/users/drasmuss/orgs","repos_url":"https://api.github.com/users/drasmuss/repos","events_url":"https://api.github.com/users/drasmuss/events{/privacy}","received_events_url":"https://api.github.com/users/drasmuss/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nengo/nengo/labels/needs%20review","name":"needs review","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":32,"created_at":"2014-11-19T02:32:18Z","updated_at":"2016-08-25T15:09:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nengo/nengo/pulls/553","html_url":"https://github.com/nengo/nengo/pull/553","diff_url":"https://github.com/nengo/nengo/pull/553.diff","patch_url":"https://github.com/nengo/nengo/pull/553.patch"},"body":"The idea is that this allows someone to specify an arbitrary Python function for the learning rule.  You need to define a function that accepts the previous decoders and a \"data\" vector, and outputs a change in the decoders.  The data vector is the output of some node; the idea is that users connect up whatever inputs they want to a passthrough node (although it doesn't have to be a passthrough, could be something more complex), and then we pass the output of that node to the learning rule.\r\n\r\nSee `test_learning_rule.py` for an example of implementing the PES rule using this syntax."},"comment":{"url":"https://api.github.com/repos/nengo/nengo/issues/comments/242422477","html_url":"https://github.com/nengo/nengo/pull/553#issuecomment-242422477","issue_url":"https://api.github.com/repos/nengo/nengo/issues/553","id":242422477,"user":{"login":"jgosmann","id":850157,"avatar_url":"https://avatars.githubusercontent.com/u/850157?v=3","gravatar_id":"","url":"https://api.github.com/users/jgosmann","html_url":"https://github.com/jgosmann","followers_url":"https://api.github.com/users/jgosmann/followers","following_url":"https://api.github.com/users/jgosmann/following{/other_user}","gists_url":"https://api.github.com/users/jgosmann/gists{/gist_id}","starred_url":"https://api.github.com/users/jgosmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgosmann/subscriptions","organizations_url":"https://api.github.com/users/jgosmann/orgs","repos_url":"https://api.github.com/users/jgosmann/repos","events_url":"https://api.github.com/users/jgosmann/events{/privacy}","received_events_url":"https://api.github.com/users/jgosmann/received_events","type":"User","site_admin":false},"created_at":"2016-08-25T15:09:10Z","updated_at":"2016-08-25T15:09:10Z","body":"> I would also note that \"worse code\" is a highly subjective statement. You see data[:2] as worse code, Trevor and I don't.\r\n\r\nTo some degree, but I suppose we can agree that everything else equal¹ self-documenting code is better than non-self-documenting code and `data[:2]` is certainly not self-documenting.\r\n\r\n¹: This is of course not the case here.\r\n\r\n> here the primary use-case is for novice users/rapid prototyping, where ease of use really is the primary factor.\r\n\r\nEase of use is equally subjective and I'm not convinced that option 1 is easier to use.\r\n\r\n> Option 3 adds entirely new systems (post.build_params, pre.get_input('neurons.out'), filters={'pre.neurons.out': 0.005}),\r\n\r\n`post.build_params` is also added by option 1 as `params` if we don't scrap it."}}
{"actor":{"display_login":"jgosmann"}}