Hi,
I have been trying to apply hebbian learning across two ensembles but the system shows a period of synchrony and desynchrony between the ensembles. I want to have synchrony behaviour in the system after learning. Here is the nengo code, is there anything which I am doing wrong?
import nengo
import numpy as np
model = nengo.Network('stngpeloop')
synapse=0.1
lam=3
wstn2gpe = 3
wstn2stn = 2
def dynamics(x):
return (synapse*(-x[0] + wstn2stn*np.tanh(lam * x[0]) - wstn2gpe*x[1]) + x[0]
, synapse*(-x[1] + wstn2gpe*np.tanh(lam * x[0])) + x[1])
with model:
stim = nengo.Node([0,0])
stngpe = nengo.Ensemble(200,2,radius = 1)
stngpe2 = nengo.Ensemble(200,2,radius = 1)
nengo.Connection(stim,stngpe)
nengo.Connection(stngpe,stngpe,function = dynamics)
nengo.Connection(stim,stngpe2)
nengo.Connection(stngpe2,stngpe2,function = dynamics)
nengo.Connection(stngpe[0],stngpe2[0],function = lambda x: 0,learning_rule_type = nengo.Oja(learning_rate = 1e-15,beta=0,pre_tau = 0.005),
solver=nengo.solvers.LstsqL2(weights = True))
nengo.Connection(stngpe2[0],stngpe[0],function = lambda x: 0,learning_rule_type = nengo.Oja(learning_rate = 1e-15,beta=0,pre_tau = 0.005),
solver=nengo.solvers.LstsqL2(weights = True))