How to use the config system in Nengo SPA?

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:

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.

1 Like