Mercurial > pylearn
diff pylearn/sampling/hmc.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 | 746ebceeb46f |
children | 55534951dd91 |
line wrap: on
line diff
--- a/pylearn/sampling/hmc.py Tue Mar 08 12:50:37 2011 -0500 +++ b/pylearn/sampling/hmc.py Wed Mar 16 20:20:02 2011 -0400 @@ -237,7 +237,7 @@ # allocate shared vars if shared_positions_shape==None: - shared_positions_shape = shared_positions.value.shape + shared_positions_shape = shared_positions.get_value(borrow=True).shape batchsize = shared_positions_shape[0] stepsize = shared(numpy.asarray(initial_stepsize).astype(theano.config.floatX), 'hmc_stepsize') @@ -289,7 +289,7 @@ `borrow=True`. """ self.simulate() - return self.positions.value.copy() + return self.positions.get_value(borrow=False) def updates(self): """Returns the update expressions required to simulate the Markov Chain