I’ve been trying to re-create the n-back model of Jan Gosmann and Chris E. I’ve been using spa.State for ‘stimulus’, memory, updated_list, etc. I’ve been using ensembles for the various gates, and the spa. BasalGanglia and spa.Thalamus .
I have had problems computing the vector dot product as shown in the attached code …
It seems if I could get around the 'dot(Stimulus,Stimulus) … error I would get reasonable results …
import numpy as np
import nengo.spa as spa
D = 8
model = spa.SPA()
if 0.1 < t < 0.2:
model.Stimulus = 'C’
elif 0.5 < t < 0.6:
model.Stimulus = 'G’
model.Strimulus = ‘0’
model.Stimulus = spa.State(D)
Thresholding = 0.5
model.Cortical_State = spa.State(D) assign_state = spa.Actions( # line 21 is below .. 'dot(Stimulus, WAIT) + 0.2 --> Cortical_State = ENCODE', 'dot(Cortical_State, ENCODE) +dot(Cortical_State,WAIT)--> Cortical_State = WAIT', # line 23 is below: 'dot(Cortical_State, TRANSFER) + 0.5 --> Cortical_State = TRANSFER' )
for line 21, I tried writing 'dot(Stimulus,Stimulus) but get …
#Compare between two sources will never be implemented
also for reasons I can’t understand in line 23, if I substitute Thresholding for 0.5 I get …
… ’ is not supported by the Basal Ganglia.
model.bg = spa.BasalGanglia(assign_state) model.thal = spa.Thalamus(model.bg) # when I try what I conceive as a 'work-around' as below print(model.Stimulus.output * model.Stimulus.output) # unsupported operand type(s) for *: 'ObjView' and 'ObjView'
Is the original model available for sharing?. I assume it’s written in Nengo 1.4.**
Finally, I wrote code that included 2/3 of the elements in figure 1 of the paper. I kept the dimensions low - 8, and the ensembles small - around 500 neurons. Yet - at least on my older computer at home - it wouldn’t load?? even though I didn’t get error messages when composing it …
Is this a computer memory issue?