def test_lazy_if_on_generics(self):
x = theano.generic()
y = theano.generic()
c = tensor.iscalar('c')
f = theano.function([c, x, y], ifelse(c, x, y))
vx = ['testX']
vy = ['testY']
assert f(1, vx, vy) == vx
assert f(0, vx, vy) == vy
评论列表
文章目录