I cannot understand which parameters I have to give or if there is another method in order to solve my problem.
Yeah, that could be documented a bit better. Here’s an example:
import nengo
from nengo.utils.neurons import spikes2events
import numpy as np
with nengo.Network() as model:
sin_input = nengo.Node(np.sin)
sin_ens = nengo.Ensemble(100, 1)
nengo.Connection(sin_input, sin_ens)
spikes_probe = nengo.Probe(sin_ens.neurons, synapse=None)
with nengo.Simulator(model) as sim:
sim.run(5.0)
spikes = sim.data[spikes_probe]
spike_times = spikes2events(sim.trange(), spikes)
# print the first 10 spikes of the
print(spike_times[0][:10])
If you’re looking to implement a custom learning rule, you should check out my example using a nengo.Node
.