<html><head></head><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:14px"><div id="yui_3_16_0_1_1454059776047_222332">Hi,</div><div id="yui_3_16_0_1_1454059776047_221803"><br></div><div id="yui_3_16_0_1_1454059776047_221803" dir="ltr">Could someone help me with the PES learning issue below:</div><div id="yui_3_16_0_1_1454059776047_221803"><br></div><div id="yui_3_16_0_1_1454059776047_221803">In my simulation, I'd like to keep PES learning on for a while and then switch it off during the 'probe' trials.<br></div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221748">[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.]</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221804"><br></div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221804">A) I'd like to be able to just set the learning_rate to zero, after simulating for a while. So I tried:</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221804" class="">    sim.run(Tmax-10.)</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221804" class="">    plasticConnEE.learning_rule['PES'].learning_rate=0</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221804" class="">    sim.run(10.)</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_223374" class="">However, this doesn't work.</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_223374" class=""><br></div><div dir="ltr" id="yui_3_16_0_1_1454059776047_223374" class="">In fact the learning_rate can only be set when instantiating the learning rule type:</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_223374" class="">plasticConnEE.learning_rule_type = {'PES':nengo.PES(learning_rate=1e-2, ...)}</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_223374" class="">If I next set:</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_223374" class=""><div dir="ltr" id="yui_3_16_0_1_1454059776047_221804" class="" style="margin-top: 0.1em; margin-bottom: 0.1em;">plasticConnEE.learning_rule['PES'].learning_rate=0</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_223543" class="">this 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?</div></div><div dir="ltr" id="yui_3_16_0_1_1454059776047_223374" class=""><br></div><div dir="ltr" id="yui_3_16_0_1_1454059776047_223374" class="">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?</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_223374" class=""><br></div><div dir="ltr" id="yui_3_16_0_1_1454059776047_223374" class="">B)</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221685">Currently I'm switching off learning by forcing the error ensemble connected to the PES learning rule, to zero firing:</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221685" class="">            error_conn = nengo.Connection(\</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221685" class="">                    errorMod,plasticConnEE.learning_rule['PES'],synapse=weightErrorTau)</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221701" class="">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.</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221701" class=""><br></div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221701" class="">C)</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221701" class="">Instead is it possible to add another 'in' connection to the PES learning rule? For example the Voja learning rule has (in build_voja()):</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221701" class=""><div dir="ltr" id="yui_3_16_0_1_1454059776047_221701" class="">    # Learning signal, defaults to 1 in case no connection is made</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221701" class="">    # and multiplied by the learning_rate * dt</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221701" class="">    learning = Signal(np.zeros(rule.size_in), name="Voja:learning")</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221701" class="">    assert rule.size_in == 1</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221701" class="">    model.add_op(Reset(learning, value=1.0))</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221701" class="">    model.sig[rule]['in'] = learning  # optional connection will attach here</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221701" class=""><br></div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221883" class="">In PES rule the 'in' connection is the error and in the Voja rule 'in' connection is 'learning'.</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221883" class=""><br></div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221883" class="">Can one have 2 different 'in' connections that perform different functions?</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221883" class=""><br></div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221883" class="">Thanks,</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221883" class="">Aditya.</div><div dir="ltr" id="yui_3_16_0_1_1454059776047_221883" class=""><br></div></div></div></body></html>