@@ -394,7 +394,7 @@ def test_SdA(finetune_lr=0.1, pretraining_epochs=15, |
394 | 394 | c.append(pretraining_fns[i](index=batch_index, |
395 | 395 | corruption=corruption_levels[i], |
396 | 396 | 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'))) |
398 | 398 |
|
399 | 399 | end_time = timeit.default_timer() |
400 | 400 |
|
@@ -442,7 +442,7 @@ def test_SdA(finetune_lr=0.1, pretraining_epochs=15, |
442 | 442 |
|
443 | 443 | if (iter + 1) % validation_frequency == 0: |
444 | 444 | validation_losses = validate_model() |
445 | | - this_validation_loss = numpy.mean(validation_losses) |
| 445 | + this_validation_loss = numpy.mean(validation_losses, dtype='float64') |
446 | 446 | print('epoch %i, minibatch %i/%i, validation error %f %%' % |
447 | 447 | (epoch, minibatch_index + 1, n_train_batches, |
448 | 448 | this_validation_loss * 100.)) |
@@ -463,7 +463,7 @@ def test_SdA(finetune_lr=0.1, pretraining_epochs=15, |
463 | 463 |
|
464 | 464 | # test it on the test set |
465 | 465 | test_losses = test_model() |
466 | | - test_score = numpy.mean(test_losses) |
| 466 | + test_score = numpy.mean(test_losses, dtype='float64') |
467 | 467 | print((' epoch %i, minibatch %i/%i, test error of ' |
468 | 468 | 'best model %f %%') % |
469 | 469 | (epoch, minibatch_index + 1, n_train_batches, |
|