From 96e9d37bef93814a16e01b733151ac9638085747 Mon Sep 17 00:00:00 2001 From: Tamino Huxohl <thuxohl@techfak.uni-bielefeld.de> Date: Mon, 26 Sep 2022 15:24:36 +0200 Subject: [PATCH] fix usage of snapshot epoch param in training --- mu_map/training/default.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mu_map/training/default.py b/mu_map/training/default.py index d0d627b..7f41f43 100644 --- a/mu_map/training/default.py +++ b/mu_map/training/default.py @@ -40,7 +40,7 @@ class Training(): self.lr_scheduler.step() logger.debug(f"Update learning rate from {_previous:.4f} to {self.lr_scheduler.get_last_lr()[0]:.4f}") - if epoch % self.snapshot_epoch: + if epoch % self.snapshot_epoch == 0: self.store_snapshot(epoch) logger.debug(f"Finished epoch {str(epoch):>{len(str(self.epochs))}}/{self.epochs + 1}") -- GitLab