def test_vm_gc():
 x = theano.tensor.vector()
 p = RunOnce()(x)
 mode = theano.Mode(linker=theano.gof.vm.VM_Linker(lazy=True))
 f = theano.function([theano.In(x, mutable=True)], [(p + 1), (p + 2)], mode=mode)
 f([1, 2, 3])
 p = RunOnce()(x)
 pp = (p + p)
 f = theano.function([x], [(pp + pp)], mode=mode)
 f([1, 2, 3])

def test_vm_gc ( ) : x = theano . tensor . vector ( ) p = RunOnce ( ) ( x ) mode = theano . Mode ( linker = theano . gof . vm . VM_Linker ( lazy = True ) ) f = theano . function ( [ theano . In ( x , mutable = True ) ] , [ ( p + 1 ) , ( p + 2 ) ] , mode = mode ) f ( [ 1 , 2 , 3 ] ) p = RunOnce ( ) ( x ) pp = ( p + p ) f = theano . function ( [ x ] , [ ( pp + pp ) ] , mode = mode ) f ( [ 1 , 2 , 3 ] )
this already caused a bug in the trunk of theano .