Re: [theano-users] Re: Theano dot function has different output than Numpy's

2018-10-03 Thread Buruk Aregawi
One correction above for posterity. The Theano version you posted, f = theano.function([x,y], np.dot(x, y)), does two vector-vector dot products. So it interprets your input matrix as two separate vectors and separately does a dot of each of them with the input vector, y. Also, note that the

Re: [theano-users] Re: Theano dot function has different output than Numpy's

2018-10-02 Thread Buruk Aregawi
I believe in Theano world, "dot" is only meant for vector-to-vector dot products. Where as in Numpy world, it as an overloaded operator/function that is sometimes a matrix-vector product, a matrix-matrix product or a vector-vector product depending on the input. On Tue, Oct 2, 2018 at 7:40 PM

[theano-users] Re: Theano dot function has different output than Numpy's

2018-10-02 Thread DL_user
I would think z=np.dot(x,y) is more meaningful but anyway apparently dot() has different meanings in Theano's world. thanks On Tuesday, October 2, 2018 at 3:59:14 PM UTC-7, Buruk Aregawi wrote: > > It seems that np.dot is interpreting this as the more standard A*x where A > is a 2x3 matrix and

[theano-users] Re: Theano dot function has different output than Numpy's

2018-10-02 Thread Buruk Aregawi
It seems that np.dot is interpreting this as the more standard A*x where A is a 2x3 matrix and x is a 3 dimensional vector. Where as theano is interpreting it is X*A where X is a 3x1 matrix and A is a 2x3 matrix. If you do z = T.dot(x,y) instead of z = np.dot(x,y) they will both work the same