Sparse matrix support
See original GitHub issueIs there any way to use autodiff on sparse scipy matrices? The docs say np.dot
isn’t supported (and attempting it throws a ValueError: setting an array element with a sequence.
). I can get the dot product with h.dot(W1)
, but autograd doesn’t work that way according to #8.
Is there any known workaround for dealing with sparse matrices, or anything planned?
Thanks for the great library!
Issue Analytics
- State:
- Created 8 years ago
- Reactions:7
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Sparse matrix - Wikipedia
In numerical analysis and scientific computing, a sparse matrix or sparse array is a matrix in which most of the elements are zero....
Read more >Sparse matrices (scipy.sparse) — SciPy v1.9.3 Manual
This class provides a base class for all sparse matrices. ... The lil_matrix class supports basic slicing and fancy indexing with a similar...
Read more >A Gentle Introduction to Sparse Matrices for Machine Learning
In this tutorial, you will discover sparse matrices, the issues they present, ... Need help with Linear Algebra for Machine Learning?
Read more >Sparse Matrices - MATLAB & Simulink
Sparse matrices provide efficient storage of double or logical data that has a large percentage of zeros. While full (or dense) matrices store...
Read more >RcppArmadillo: Sparse Matrix Support
There are 31 types of sparse matrices in the Matrix package that can be used directly. But for now, only. 12 of them...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Did somebody start working on that? Sparse matrix support would make this really cool project even cooler as this would make it suitable for a variety of new tasks, especially for natural language processing.
For proper support, we’d probably have to wrap the functions in scipy.sparse, analogous to the way we wrap scipy.linalg (and numpy everything else, check out autograd/scipy/ for examples). We may also need to introduce a new Node type to wrap sparse matrix instances. I don’t think sparse support is on any of our task lists right now, so this issue might remain open for a while.