In [8]:
import numpy as np
import theano.tensor as T
from theano import function

x = T.dscalar('x')
y = T.dscalar('y')
z = x + y
f = function([x, y], z)

print f(2,3)


5.0

In [10]:
from theano import pp
print pp(z)


(x + y)

In [15]:
#matrix
x = T.dmatrix('x')
y = T.dmatrix('y')
z = x + y
#z = T.dot(x, y)
f = function([x, y], z)

print f(np.arange(12).reshape((3,4)), 10*np.ones((3,4)))


[[ 10.  11.  12.  13.]
 [ 14.  15.  16.  17.]
 [ 18.  19.  20.  21.]]

In [ ]: