Discussion:
[theano-users] dot product of sparse and dense matrix
Lalit Pradhan
2017-07-17 15:55:50 UTC
Permalink
Hi,

I have:
A scipy sparse matrix 'csr' with shape (262144, 262144) and 6522916 non
zero rows
and
A theano tensor variable, a flattened (512*512) = 262144 output of a
feature map.

I want to do a dot product in theano between them. How can i convert the
scipy sparse matrix into a theano sparse matrix? How do I go about this
task?

Thanks,
Lalit
I split the PR, the new PR is: https://github.com/Theano/Theano/pull/1264
I updated your name.
thanks
Fred
thank you for the credit. If we are going formal, you can include my
real
name which is Zsolt Bitvai, no less peculiar
The fix are in PR: https://github.com/Theano/Theano/pull/1263
thanks for the report.
Fred
I have a fix in preparation.
The problem is sparse.Dot.make_node. It was always making a matrix
output even if the inputs aren't matrices.
Fred
On Mon, Mar 4, 2013 at 1:35 PM, Pascal Lamblin
theano.printing.debugprint(r)
I'm guessing the problem is that SparseDot.infer_shape returns
something
of length 1, because one of the inputs is a vector, but it should be
of
length 2, because the output is a sparse matrix, as there are no
sparse
vectors.
I'm running '0.6.0rc3' When I try to upgrade I get an error though.
sudo pip install --upgrade theano
Command python setup.py egg_info failed with error code 1 in
/home/user/build/scipy
0.6.0rc3 is the last release candidate at the moment, so it's OK.
In the future, you should run "sudo pip install --upgrade --no-deps
theano".
The "--no-deps" bit ensures you upgrade only Theano, not scipy and
numpy.
--
Pascal
--
---
You received this message because you are subscribed to the Google
Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it,
send
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to a topic in the
Google Groups "theano-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/theano-users/_rEHTO06utQ/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to the Google
Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...