Theano/Theano — pull request #448 by lamblin (2012-02-15 22:43:44+00:00)
Title: Broadcast input of sparse_from_dense so ndim=2

SparseFromDense ops will always have an output of dimension 2, regardless of the input's dimension.
This was causing problems with infer_shape, and the gradient's number of dimensions.
Now, we make sure the node's input has dimension 2, and to rebroadcast the gradient accordingly.