@@ -394,7 +394,7 @@ def test_SdA(finetune_lr=0.1, pretraining_epochs=15,
394394 c .append (pretraining_fns [i ](index = batch_index ,
395395 corruption = corruption_levels [i ],
396396 lr = pretrain_lr ))
397- print ('Pre-training layer %i, epoch %d, cost %f' % (i , epoch , numpy .mean (c )))
397+ print ('Pre-training layer %i, epoch %d, cost %f' % (i , epoch , numpy .mean (c , dtype = 'float64' )))
398398
399399 end_time = timeit .default_timer ()
400400
@@ -442,7 +442,7 @@ def test_SdA(finetune_lr=0.1, pretraining_epochs=15,
442442
443443 if (iter + 1 ) % validation_frequency == 0 :
444444 validation_losses = validate_model ()
445- this_validation_loss = numpy .mean (validation_losses )
445+ this_validation_loss = numpy .mean (validation_losses , dtype = 'float64' )
446446 print ('epoch %i, minibatch %i/%i, validation error %f %%' %
447447 (epoch , minibatch_index + 1 , n_train_batches ,
448448 this_validation_loss * 100. ))
@@ -463,7 +463,7 @@ def test_SdA(finetune_lr=0.1, pretraining_epochs=15,
463463
464464 # test it on the test set
465465 test_losses = test_model ()
466- test_score = numpy .mean (test_losses )
466+ test_score = numpy .mean (test_losses , dtype = 'float64' )
467467 print ((' epoch %i, minibatch %i/%i, test error of '
468468 'best model %f %%' ) %
469469 (epoch , minibatch_index + 1 , n_train_batches ,
0 commit comments