In [1]:
import theano
In [2]:
from theano import tensor
In [3]:
a = tensor.dscalar()
b = tensor.dscalar()
In [4]:
type(a)
Out[4]:
In [7]:
c = a + b #Create a simple symbolic expression
In [8]:
#Convert the expression into a callable object that takes (a,b) and computes c
f = theano.function([a,b], c)
In [9]:
type(f)
Out[9]:
In [12]:
result = f(1.5, 2.5)
In [13]:
print(result)
In [15]:
type(result)
Out[15]:
In [ ]: