comparison pylearn/sampling/tests/test_mcmc.py @ 1447:fbe470217937

Use .get_value() and .set_value() of shared instead of the .value property
author Pascal Lamblin <lamblinp@iro.umontreal.ca>
date Wed, 16 Mar 2011 20:20:02 -0400
parents 492473059b37
children
comparison
equal deleted inserted replaced
1446:6e50d209b5f1 1447:fbe470217937
20 20
21 21
22 position = shared(rng.randn(batchsize, 2).astype(theano.config.floatX)) 22 position = shared(rng.randn(batchsize, 2).astype(theano.config.floatX))
23 sampler = sampler_cls([position], gaussian_energy) 23 sampler = sampler_cls([position], gaussian_energy)
24 24
25 print 'initial position', position.value 25 print 'initial position', position.get_value(borrow=True)
26 print 'initial stepsize', sampler.stepsize 26 print 'initial stepsize', sampler.stepsize
27 27
28 # DRAW SAMPLES 28 # DRAW SAMPLES
29 29
30 samples = [sampler.draw() for r in xrange(burnin)] #burn-in 30 samples = [sampler.draw() for r in xrange(burnin)] #burn-in