@@ -239,7 +239,7 @@ def test_dA( learning_rate = 0.1, training_epochs = 15, dataset ='../data/mnist.
239239 train_set_x , train_set_y = datasets [0 ]
240240
241241 # compute number of minibatches for training, validation and testing
242- n_train_batches = train_set_x .value .shape [0 ] / batch_size
242+ n_train_batches = train_set_x .get_value ( borrow = True ) .shape [0 ] / batch_size
243243
244244 # allocate symbolic variables for the data
245245 index = T .lscalar () # index to a [mini]batch
@@ -286,7 +286,7 @@ def test_dA( learning_rate = 0.1, training_epochs = 15, dataset ='../data/mnist.
286286 training_time = (end_time - start_time )
287287
288288 print >> sys .stderr , ('The no corruption code for file ' + os .path .split (__file__ )[1 ]+ ' ran for %.2fm' % ((training_time )/ 60. ))
289- image = PIL .Image .fromarray (tile_raster_images ( X = da .W .value .T ,
289+ image = PIL .Image .fromarray (tile_raster_images (X = da .W .get_value ( borrow = True ) .T ,
290290 img_shape = (28 ,28 ),tile_shape = (10 ,10 ),
291291 tile_spacing = (1 ,1 )))
292292 image .save ('filters_corruption_0.png' )
@@ -329,7 +329,7 @@ def test_dA( learning_rate = 0.1, training_epochs = 15, dataset ='../data/mnist.
329329
330330 print >> sys .stderr , ('The 30% corruption code for file ' + os .path .split (__file__ )[1 ]+ ' ran for %.2fm' % (training_time / 60. ))
331331
332- image = PIL .Image .fromarray (tile_raster_images ( X = da .W .value .T ,
332+ image = PIL .Image .fromarray (tile_raster_images (X = da .W .get_value ( borrow = True ) .T ,
333333 img_shape = (28 ,28 ),tile_shape = (10 ,10 ),
334334 tile_spacing = (1 ,1 )))
335335 image .save ('filters_corruption_30.png' )
0 commit comments