Number of synapses

Hi,

Is there some code to calculate the effective number of synapses in a Network? I don’t think there’s a straightforward implementation, given the extensive use of Nodes in the connections (especially in SPA). I’d like to know whether some of you have thought about it before I consider implementing it myself.

Thanks,
Hugo

Thanks for the suggestion. I think this is a good idea for obtaining metrics about a model, and so it may make sense to do so alongside some other features for benchmarking and metric collection that have been planned. I’ve submitted it as a feature request here so that you can keep an eye on any progress: https://github.com/nengo/nengo/issues/1620.

Since you say you are considering implementing it yourself, let us know if you have any more questions and how that progresses (you could post on the GitHub issue and submit a PR if you do decide to try this). I think the most difficult part will be dealing with fan-in and fan-out from passthrough nodes. The easiest way to start—without going deep into the builder—might be to iterate over Network.all_connections and build up a graph that you can then work with. There is some code in nengo-loihi for removing passthrough nodes that could perhaps be repurposed here for your needs.

1 Like