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
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'scompute
method, usePyRegion.setSparseOutput
method to update the sparse output. Seebindings/py/tests/sparse_link_test.py
@subutai, @scottpurdy please review