-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sparse Data Support #937
Sparse Data Support #937
Conversation
It's a pretty big PR so I haven't looked through it yet, but one thing in my mind is that we probably want to separate out the InnerProductLayer change to a SparseInnerProductLayer. This would hopefully make things a bit clearer rather than putting everything in one chunk. |
I initially thought of separating them but I then realized that in this way I was able to pass as input both dense and sparse data. Moreover conceptually the variables of the inner product are exactely the same weather the input is sparse or not and so I though that conceptually it was cleaner. In any case the code is separated in different files as if there were different layers and the change in the original InnerProductLayer is very minimal. |
c82932c
to
8b827d9
Compare
4278286
to
c01f07a
Compare
1afefce
to
2a2a5de
Compare
I split the InnerProductLayer as you said. Now there is a subclass of InnerProductLayer that support sparse input. Let me know if you need any clarification on the code. |
cb5d2f8
to
de5308c
Compare
I rebase it to the latest dev branch. |
Thanks for the rebase! We will review this after the CVPR deadline.
|
de5308c
to
da35dfa
Compare
I have a rebase ready on top of current master. Should I create a new PR on master? |
That would be great. Thanks @alemagnani!
|
I'll close this as it's been replaced by #2364. Thanks for updating @alemagnani! |
This PR has been replaced by #2364
This adds some basic support for sparse data in CSR format. The main thing is a SparseBlob to store the sparse data and an extension to InnerProduct that handles both dense and sparse depending on what is presented at the input. A new data layer is added to read data from LevelDB.
Some more details:
If this is of interest to people I also have locally a data layer for sparse data that uses a block of memory and an extension to Pycaffe to make use of it and deal in python with sparse matrices.