You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to allow to have parameters change between runs, the easiest way to support this is to have codeobjects (state updater, reset, threshold) get regenerated on every run. This is also more robust then to only do changes in the namespace, as a state updater might have replaced constant values with literals already.
I think the cleanest way to do this is to replace the current prepare method in Network and BrianObject with pre_run and post_run. In contrast to the prepare method, which was called at somewhat unspecified times and could be called multiple times, pre_run and post_run should be called exactly once before and after a run.
In NeuronGroup, pre_run would take care of building the code objects.
The text was updated successfully, but these errors were encountered:
We want to allow to have parameters change between runs, the easiest way to support this is to have codeobjects (state updater, reset, threshold) get regenerated on every run. This is also more robust then to only do changes in the namespace, as a state updater might have replaced constant values with literals already.
I think the cleanest way to do this is to replace the current
prepare
method in Network and BrianObject withpre_run
andpost_run
. In contrast to theprepare
method, which was called at somewhat unspecified times and could be called multiple times,pre_run
andpost_run
should be called exactly once before and after a run.In NeuronGroup,
pre_run
would take care of building the code objects.The text was updated successfully, but these errors were encountered: