numenta / nupic.core-legacy

Implementation of core NuPIC algorithms in C++ (under construction)
http://numenta.org
GNU Affero General Public License v3.0
272 stars 276 forks source link

DEVOPS-353: Add SDR links to the Network API #1399

Closed lscheinkman closed 6 years ago

lscheinkman commented 6 years ago

The current network API implementation expects the data exchanged between regions to be dense arrays.

This PR extends the network API by allowing regions to use both sparse or dense arrays as their inputs and outputs. Only when necessary the network API will convert the sparse arrays into dense arrays, and vice-versa.

To use this feature, you must first specify which inputs/outputs are sparse using the new sparse attribute in the region spec and on the region's compute method, use PyRegion.setSparseOutput method to update the sparse output. See bindings/py/tests/sparse_link_test.py

@subutai, @scottpurdy please review