Default to TensorKind.SPARSE_COO for sparse tensors #181
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently we default to
TensorKind.SPARSE_CSR
for 2D sparse arrays on Pytorch, However the CSR sparse tensor format:UserWarning: Sparse CSR tensor support is in beta state. If you miss a functionality in the sparse tensor support, please submit a feature request to https://github.com/pytorch/pytorch/issues
This small PR changes the default sparse tensor kind to be always
TensorKind.SPARSE_COO
for both Pytorch and Tensorflow, regardless of the array shape. The user can still select CSR tensors by passing explicitlytensor_kind=TensorKind.SPARSE_CSR
toArrayParams
.