From 83b9e670f8f727e69d9237ca09828556bb5b0b72 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Tue, 11 Jun 2019 11:34:04 +0200 Subject: [PATCH] Moved loss metric assignment into begin of epoch Signed-off-by: Jim Martens --- src/twomartens/masterthesis/ssd.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/twomartens/masterthesis/ssd.py b/src/twomartens/masterthesis/ssd.py index 4cd3432..00cc383 100644 --- a/src/twomartens/masterthesis/ssd.py +++ b/src/twomartens/masterthesis/ssd.py @@ -458,16 +458,13 @@ def _train_epochs(nr_batches_per_epoch: int, epoch = 0 batch_counter = 0 epoch_var.assign(epoch) - epoch_start_time = None - - # define loss variables - ssd_loss_avg = tfe.metrics.Mean(name='ssd_loss', dtype=tf.float32) # go through data set for x, y in dataset: if batch_counter == 0: # epoch starts epoch_start_time = time.time() + ssd_loss_avg = tfe.metrics.Mean(name='ssd_loss', dtype=tf.float32) labels = [] for i in range(y.shape[0]):