Replies: 2 comments
-
The motivation was that I suspected my slow runtime was due to the vast number of synapses I had to include to jit (one-hot encoding is the only way since I can't move around synapses) but even if I reduced the number of synapses runtime did not improve. So maybe this real-time computing of current is slow (almost 50-fold, based on my very crude benchmark)? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I agree that this would be useful to have, but no, it is not currently implemented. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am wondering if it can be a nice feature, or if it is something user can implement easily right now:
Electrodes inject current that's precomputed: we specify the current before simulation. Synapses generally follow g (1/Ohm) * driving force (V) and even if g can be precomputed, driving force (df) cannot, as it needs to know the postsynaptic cell's voltage.
Electrodes don't change the net's morphology and can easily change location once backend is jnp instead of dataframe, while synapses will change morphology and might be harder to jit/vmap (please correct me if I'm wrong right here!).
So I am wondering if there is a way to combine the benefits: the current can be more accurate in the sense of being calculated based on real-time postsynaptic cell's voltage, and the current can be moved around more easily (compatible with jit).
The idea comes from NEURON's AlphaSynapse: its interface is very similar to that of an electrode while the internal dynamics are synaptic.
Here is a code snippet from NEURON:
`synapses['syn_{}'.format(i)] = h.AlphaSynapse(xxx)
synapses['syn_{}'.format(i)].onset =xxx
synapses['syn_{}'.format(i)].tau = xxx
synapses['syn_{}'.format(i)].gmax = xxx
synapses['syn_{}'.format(i)].e = xxx'
Some primitive ideas I have right now is instead of looking at an external jnp array (static), call an external/user-defined function.
Beta Was this translation helpful? Give feedback.
All reactions