HierarchicalTemporalMemory.jl
HierarchicalTemporalMemory.jl copied to clipboard
Explore SparseArrayKit.jl (DOK format, N-D tensors)
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:
- slow selection of
[pre]
rows, so it's useful for backpropagation instead of forward - slow (+hacky) addition of new synapses src/dynamical_systems.jl#L319
Dict 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.
The flow of information on a matrix is always from columns to rows, so it should be [post x pre]
, right?