@Seanny123 How would you provide the weights as input to the node?
Also @drasmuss’s solution has some pitfalls and will save the data from the first simulation run in all steps. This is happens because the access via sim.data
is internally cached and it is assumed that the amount of probe data in sim.model.params[probe]
always grows. However, the size of the probed data will the same in each loop and sim.data
will always return the result cached in the first loop. Two things could be done, to actually save the desired data: either always access it via sim.model.params[p]
(this will give you a list instead of a NumPy array; I also think that the sim.model.params
access is considered an implementation detail and might change in future versions), or clear the sim.data
cache with sim.data.reset()
in each loop.
@ZhangPeng I assume setting sample_every to a higher value to record less samples overall is not an option?
Some related things from GitHub:
- There is an issue about adding a better way to clear probe data
-
There is an Nengo enhancement proposal (NEP401) that included probing to files. It got rejected in favour of using
nengo.Process
instances (basicallynengo.Node
s that can store a state) as opposed tonengo.Probe
. However, it seems to be that the discussion about that NEP is missing any mention of things that cannot be provided as input to a Nengo object such as weights (or maybe they can and I’m missing how, @Seanny123?). So maybe the arguments in the NEP401 have to be revisited?