element wise matrix multiply?

Showing 1-3 of 3 messages
element wise matrix multiply? Dmitry Lagun 4/17/13 3:40 PM
Hi,

I could not quickly find in the documentation - is there some analog of element wise matrix multiplication implemented in Theano?

Thanks,
Dmitry
Re: [theano-users] element wise matrix multiply? Pascal Lamblin 4/17/13 3:55 PM
Hi Dmitry,

On Wed, Apr 17, 2013, Dmitry Lagun wrote:
> I could not quickly find in the documentation - is there some analog of
> element wise matrix multiplication implemented in Theano?

You can simply use '*':
a, b = theano.tensor.matrices('a', 'b')
f = theano.function([a, b], a * b)
f([[0, 1], [2, 3]], [[3, 1], [0, 2]])

array([[ 0.,  1.],
       [ 0.,  6.]])


--
Pascal
Re: [theano-users] element wise matrix multiply? Dmitry Lagun 4/17/13 3:55 PM
Thanks!