From 92965b9bb7181b1904cd2ea8ab1bbe47e341a490 Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Mon, 2 May 2022 11:49:40 +0200 Subject: [PATCH] Better handling of the input mean --- learn_it.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/learn_it.py b/learn_it.py index 24e3e30..5983b6c 100644 --- a/learn_it.py +++ b/learn_it.py @@ -117,7 +117,8 @@ elif cfg.data_mode == "MNIST_FASHION": else: raise Exception("data_mode unknown") -cfg.image_statistics.mean = the_dataset_train.mean +if len(cfg.image_statistics.mean) == 0: + cfg.image_statistics.mean = the_dataset_train.mean # The basic size cfg.image_statistics.the_size = [ @@ -508,7 +509,7 @@ with torch.no_grad(): lr_scheduler_eps.step(my_loss_for_batch) tb.add_scalar( - "Train Performance", 100.0 - performance, cfg.learning_step + "Train Error", 100.0 - performance, cfg.learning_step ) tb.add_scalar("Train Loss", my_loss_for_batch, cfg.learning_step) tb.add_scalar(