1. 两个矩阵相加
import theano.tensor as T
from theano import function
x = T.dmatrix('x')
y = T.dmatrix('y')
z = x + y
f = function([x,y], z)
f([2,3], [4,5])
2 .logistic function
import theano.tensor as T
from theano import function
x = T.dmatrix('x')
s = 1/ (1 + T.exp(-x))
logistic = function([x], s)
logistic([1, 2])