From 65329dba31396c009a85acb4315222cf83588309 Mon Sep 17 00:00:00 2001 From: mrq Date: Sat, 25 Feb 2023 15:31:18 +0000 Subject: [PATCH] oops, epoch increments twice --- src/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.py b/src/utils.py index 02798d9..3fc3776 100755 --- a/src/utils.py +++ b/src/utils.py @@ -542,12 +542,12 @@ class TrainingState(): if line.find('%|') > 0 and not self.open_state: if owner: self.open_state = True - elif lapsed: + elif lapsed and self.open_state: if owner: self.open_state = False self.epoch = self.epoch + 1 self.it = int(self.epoch * (self.dataset_size / self.batch_size)) - + self.epoch_time_end = time.time() self.epoch_time_delta = self.epoch_time_end-self.epoch_time_start self.epoch_time_start = time.time()