From 4dda663e3b13e7c5c4c2577028aed25c69ccbafb Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Fri, 8 Feb 2019 06:59:57 +0100 Subject: [PATCH] Added resetting the states of the metrics Signed-off-by: Jim Martens --- src/twomartens/masterthesis/aae/train.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/twomartens/masterthesis/aae/train.py b/src/twomartens/masterthesis/aae/train.py index be94b7e..12de161 100644 --- a/src/twomartens/masterthesis/aae/train.py +++ b/src/twomartens/masterthesis/aae/train.py @@ -198,6 +198,12 @@ def train_mnist(folding_id: int, inlier_classes: Sequence[int], total_classes: i summary_ops_v2.scalar('encoder_decoder_loss', enc_dec_loss_avg.result(), step=global_step_enc_dec) summary_ops_v2.scalar('z_discriminator_loss', zd_loss_avg.result(), step=global_step_zd) summary_ops_v2.scalar('x_discriminator_loss', xd_loss_avg.result(), step=global_step_xd) + # reset the metrics states + encoder_loss_avg.reset_states() + decoder_loss_avg.reset_states() + enc_dec_loss_avg.reset_states() + zd_loss_avg.reset_states() + xd_loss_avg.reset_states() if it == 0: directory = 'results' + str(inlier_classes[0])