示例
from theano import tensor as T
from theano.ifelse import ifelse
import theano, time, numpy
a,b =...T.switch(T.lt(a, b), T.mean(x), T.mean(y))
z_lazy = ifelse(T.lt(a, b), T.mean(x), T.mean(y))
f_switch = theano.function...([a, b, x, y], z_switch,
mode=theano.Mode(linker='vm'))
f_lazyifelse = theano.function...([a, b, x, y], z_lazy,
mode=theano.Mode(linker='vm'))
val1 = 0.
val2...这在编译的Theano函数的执行期间不引起任何改变。