From e8f15d808236d425c58c0089d467e144e19cce3e Mon Sep 17 00:00:00 2001 From: Tamino Huxohl <thuxohl@techfak.uni-bielefeld.de> Date: Tue, 4 Oct 2022 16:38:22 +0200 Subject: [PATCH] change loss from MSE to L1 --- mu_map/training/default.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mu_map/training/default.py b/mu_map/training/default.py index 1b24b4c..fe8aa38 100644 --- a/mu_map/training/default.py +++ b/mu_map/training/default.py @@ -38,7 +38,8 @@ class Training: self.lr_scheduler = torch.optim.lr_scheduler.StepLR( self.optimizer, step_size=self.lr_decay_epoch, gamma=self.lr_decay_factor ) - self.loss_func = torch.nn.MSELoss(reduction="mean") + # self.loss_func = torch.nn.MSELoss(reduction="mean") + self.loss_func = torch.nn.L1Loss(reduction="mean") def run(self): for epoch in range(1, self.epochs + 1): -- GitLab