I am trying to find the dot product between a scipy sparse matrix and a numpy.ndarray. tensor refers to theano.tensor. X is the sparse matrix and W_hidden is the ndarray. b_hidden is also ndarray.
tensor.tanh(tensor.dot(X,self.W_hidden)+self.b_hidden)
However, there are several problems with this line. I cant compute the dot product. Apart from that, it seems like I am not able to add a constant ndarray to a sparse matrix and further more, I cant apply the tanh function. The error that I get is:
TypeError("Cannot convert %s to TensorType" % str_x, type(x))
any help as to how I can solve this problem is highly appreciated.
dotoperation, the addition, and thetanhoperation to better drill down on the error? - jdotjdot