Synapses are by nature 2D (pre-, post-synaptic addresses). In case of multiple spatial dimensions, no reason to burden the synapse matrices with those but rather should calculate linear addresses as is currently done.
However a CSC [pre x post] synapse matrix has 2 disadvantages:
slow selection of [pre] rows, so it's useful for backpropagation instead of forward
https://github.com/Jutho/SparseArrayKit.jl
N-D tensors
Synapses are by nature 2D (pre-, post-synaptic addresses). In case of multiple spatial dimensions, no reason to burden the synapse matrices with those but rather should calculate linear addresses as is currently done. However a CSC
[pre x post]
synapse matrix has 2 disadvantages:[pre]
rows, so it's useful for backpropagation instead of forwardDict of Keys (DOK) format
This format provides O(1) access in both directions + insertion, so it's interesting to compare performance in practice.
Adopting this for DistalSynapses would also eliminate hacky code to resize the CSC with minimum loss.