[nengo-user] simple way to switch PES learning on and off

Aditya Gilra aditya_gilra at yahoo.com
Tue Feb 2 07:26:09 EST 2016


Hi,
Could someone help me with the PES learning issue below:
In my simulation, I'd like to keep PES learning on for a while and then switch it off during the 'probe' trials.
[I could make my learning rate small enough that the probe trials do not change the learned weights too much. But then it takes too long a learning period.]
A) I'd like to be able to just set the learning_rate to zero, after simulating for a while. So I tried:    sim.run(Tmax-10.)    plasticConnEE.learning_rule['PES'].learning_rate=0    sim.run(10.)However, this doesn't work.
In fact the learning_rate can only be set when instantiating the learning rule type:plasticConnEE.learning_rule_type = {'PES':nengo.PES(learning_rate=1e-2, ...)}If I next set:plasticConnEE.learning_rule['PES'].learning_rate=0this has no effect. This is even before I create a Simulation() object, so even before the add_op()-s. Perhaps there's no setter method for learning_rate?
Basically the question is, is there is a way to change the learning_rate mid simulation. And not just learning rate, but any other parameter?
B)Currently I'm switching off learning by forcing the error ensemble connected to the PES learning rule, to zero firing:            error_conn = nengo.Connection(\                    errorMod,plasticConnEE.learning_rule['PES'],synapse=weightErrorTau)Thus I put in a huge negative input into all neurons of errorMod, so that the error goes to zero. However, the error population doesn't instantaneously go to zero.
C)Instead is it possible to add another 'in' connection to the PES learning rule? For example the Voja learning rule has (in build_voja()):    # Learning signal, defaults to 1 in case no connection is made    # and multiplied by the learning_rate * dt    learning = Signal(np.zeros(rule.size_in), name="Voja:learning")    assert rule.size_in == 1    model.add_op(Reset(learning, value=1.0))    model.sig[rule]['in'] = learning  # optional connection will attach here
In PES rule the 'in' connection is the error and in the Voja rule 'in' connection is 'learning'.
Can one have 2 different 'in' connections that perform different functions?
Thanks,Aditya.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://artsservices.uwaterloo.ca/pipermail/nengo-user/attachments/20160202/15eba7ed/attachment-0002.html>


More information about the nengo-user mailing list