nengo / nengo-extras

Extra utilities and add-ons for Nengo
https://www.nengo.ai/nengo-extras
Other
5 stars 8 forks source link

Add association matrix learning rule (AML). #72

Closed jgosmann closed 6 years ago

jgosmann commented 6 years ago

Adds the association matrix learning rule (AML). This learning rule allows to learn associations from cue vectors to target vectors in a one-shot fashion without catastrophic forgetting. An implementation is provided for the reference simulator and Nengo OCL. As far as I can tell, Nengo OCL does not provide a possibility to register custom plan_* functions. Thus, the OCL implementation adds a new AmlSimulator class inheriting nengo_ocl.Simulator.

I added a test. To run it with the OCL implemenation:

pytest nengo_extras/tests/test_learning_rules.py -k aml --plots --simulator nengo_extras.ocl.AmlSimulator --slow

Demonstration: aml

More details on the learning rule will be in my forthcoming PhD thesis.

Seanny123 commented 6 years ago

FYI, static tests are failing due to flake8 errors.

jgosmann commented 6 years ago

It'd be nice to get this merge and a release. I am planning a tutorial on the learning rule during the summer school.

tbekolay commented 6 years ago

I'll do this tomorrow :+1:

jgosmann commented 6 years ago

The iteration over fig.axes would never stop, so I changed it to explicitly iterating over a list of the three axes.

Maybe we also should fix the fixture? (But I'm fine with explicitly iterating over the axes here to have backwards compatibility.)

tbekolay commented 6 years ago

Maybe we also should fix the fixture? (But I'm fine with explicitly iterating over the axes here to have backwards compatibility.)

Yeah, I'll make an issue for it in Nengo.

tbekolay commented 6 years ago

https://github.com/nengo/nengo/issues/1441 made, merging!