<div dir="ltr">Hi Francesco,<div><br></div><div>The source of the confusion here is that, by default, we aren't dealing with low-level quantities like currents and voltage. Instead, Nengo builds network using the principles of the Neural Engineering Framework (NEF). A brief summary of the principles of the NEF can be found in this notebook: <a href="http://pythonhosted.org/nengo/examples/nef_summary.html" target="_blank">http://pythonhosted.org/nengo/examples/nef_summary.html</a></div><div><br></div><div>In your specific example, the current that you're injecting into the neuron in the ensemble `e` is computed as the input signal (the value represented in `u`) multiplied by the gain of the neuron, plus the bias. Since you have not specified the gain and bias (or the max_rates and intercepts), the gain and bias will be essentially random.</div><div><br></div><div>If you want to inject current directly, you can connect to `e.neurons` instead of `e`. This bypasses the gain and bias. Alternatively, you can set the gain and bias so that the amount of current injected is predictable. I've shown both of these options in an example notebook:</div><div><br></div><div><a href="https://gist.github.com/tbekolay/f871692fc29c9eaed776">https://gist.github.com/tbekolay/f871692fc29c9eaed776</a><br></div><div><br></div><div>Note also that when you probe an ensemble, by default you get the decoded value, not the spiking activity of the ensemble. To get the spiking activity, you must probe `e.neurons`. I've provided an example of that in the notebook as well.</div><div><br></div><div>Hope this helps! Let us know if you have more questions!</div><div><br></div><div>- Trevor</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 16, 2016 at 3:26 AM, Francesco Gallo Afflitto <span dir="ltr"><<a href="mailto:acermatch@hotmail.it" target="_blank">acermatch@hotmail.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="IT" link="blue" vlink="#954F72"><div><p class="MsoNormal">Hi, i’m a student of university of Catania (Italy) and i’m using nengo 2.0</p><p class="MsoNormal">Following tutorials, i built the model of Izhikevich, but i don’t undestand how to change the input J (the current injection) in the model. </p><p><u></u><span>-<span style="font:7.0pt "Times New Roman""> </span></span><u></u>What is the reason for which we put as input a constant value of zero (nengo.Node(0)) ?</p><p class="MsoNormal">I would change my input and insert for example a step like this (u = nengo.Node(piecewise({0:0.1,2:10}))). But if i make this change, the output is not a spiking neuron. Why? Because seem to not work well if the input is Greater than 0.3. What i’ve to change?</p><p><u></u><span>-<span style="font:7.0pt "Times New Roman""> </span></span><u></u>There is a way to change the initial condition of equation model?</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The code i used is this:</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">import nengo</p><p class="MsoNormal">from nengo.utils.functions import piecewise</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">model = nengo.Network()</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">with model:</p><p class="MsoNormal"> u = nengo.Node(0)</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"> e = nengo.Ensemble(n_neurons=1, dimensions=1,</p><p class="MsoNormal"> neuron_type=nengo.Izhikevich(</p><p class="MsoNormal"> tau_recovery=0.02,</p><p class="MsoNormal"> coupling=0.2,</p><p class="MsoNormal"> reset_voltage=-55,</p><p class="MsoNormal"> reset_recovery=4))</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"> nengo.Connection(u, e)</p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">thanks a lot!<u></u><u></u></span></p></div></div><br>_______________________________________________<br>
nengo-user mailing list<br>
<a href="mailto:nengo-user@ctnsrv.uwaterloo.ca">nengo-user@ctnsrv.uwaterloo.ca</a><br>
<a href="http://ctnsrv.uwaterloo.ca/mailman/listinfo/nengo-user" rel="noreferrer" target="_blank">http://ctnsrv.uwaterloo.ca/mailman/listinfo/nengo-user</a><br>
<br></blockquote></div><br></div>