mlech26l / ncps

PyTorch and TensorFlow implementation of NCP, LTC, and CfC wired neural models
https://www.nature.com/articles/s42256-020-00237-3
Apache License 2.0
1.86k stars 297 forks source link

why [-1, 1, 1]? #49

Closed rouniuyizu closed 1 year ago

rouniuyizu commented 1 year ago

hello, could someone help me understand why not self._rng.choice([-1, 1])?

https://github.com/mlech26l/ncps/blob/5b6c3f8ff3ffbf0ee4434a0b8b7dc2beabc06cdd/ncps/wirings/wirings.py#L307

mlech26l commented 1 year ago

This is such that there is a 66% (2/3) chance of having an excitatory synapse and a 33% (1/3) chance of having an inhibitory synapse. Arguably, we want more excitatory synapses in the initialized network because a majority of inhibitory synapses can potentially collapse the dynamics of the network (i.e., forcing everything to zero).

rouniuyizu commented 1 year ago

I see. Thank you,

This is such that there is a 66% (2/3) chance of having an excitatory synapse and a 33% (1/3) chance of having an inhibitory synapse. Arguably, we want more excitatory synapses in the initialized network because a majority of inhibitory synapses can potentially collapse the dynamics of the network (i.e., forcing everything to zero).