Skip to content

Commit

Permalink
Added documentation for error message format
Browse files Browse the repository at this point in the history
  • Loading branch information
tcstewar committed Sep 26, 2018
1 parent 3544d5e commit 766f871
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions nengo_loihi/snips/nengo_learn.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ int guard_learn(runState *s) {
return 1;
}

/***********************************************************************
* Handles passing learning information to the correct learning rules
* to implement PES learning on Loihi.
*
* The required data is passed to this snip from the standard nengo_io
* snip via the userData structure. The data format is as follows:
*
* 0: n_errors: the number of learning signals. This is the same as the
* number of Connections in the original Nengo model that terminate on
* a conn.learning_rule.
*
* This indicates how many copies of the following block there will
* be.
* -------------
* 1: core: The core id for the weights of the first learning connection
* 2: n_vals: The number of dimensions of the error signal
* 3..3+n_vals: The error signal (multiplied by 100, rounded to an int and
* clipped to -100,100)
* -------------
*/
void nengo_learn(runState *s) {
int offset = 1;
int n_errors = s->userData[0];
Expand Down

0 comments on commit 766f871

Please sign in to comment.