How to use the config system in Nengo SPA?


#1

If I want to configure a single spa.State object to have certain intercepts in it’s ensembles, how do I accomplish this with the config system? I tried the following, but the defaults were unchanged:

import nengo_spa as spa
import nengo

D = 32

inter_config = nengo.Config(nengo.Ensemble)
inter_config[nengo.Ensemble].intercepts = nengo.dists.Uniform(0.15, 0.5)


with spa.Network() as model:
    with inter_config:
        state = spa.State(D, represent_identity=False)

for ens in state.all_ensembles:
    print(ens.intercepts)

#2

This isn’t specific to SPA and is about how configs and pre-defined networks interact in Nengo in general. It has been discussed before (for example here).

To change the intercepts on the spa.State network, you have to create the network and modify the network afterwards.


#3