From c51836f553575e41b3235e162c4a9ea63acd5bc0 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Wed, 1 May 2019 12:36:35 +0200 Subject: [PATCH] Improved debug print Signed-off-by: Jim Martens --- src/twomartens/masterthesis/ssd.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/twomartens/masterthesis/ssd.py b/src/twomartens/masterthesis/ssd.py index 8c815a5..4f66cfc 100644 --- a/src/twomartens/masterthesis/ssd.py +++ b/src/twomartens/masterthesis/ssd.py @@ -183,6 +183,8 @@ def _predict_one_epoch(dataset: tf.data.Dataset, import gc from tensorflow.python.eager import context + lists = None + for inputs in dataset: decoded_predictions_batch = [] if use_dropout: @@ -216,9 +218,12 @@ def _predict_one_epoch(dataset: tf.data.Dataset, from pympler import muppy, summary all_objects = muppy.get_objects() all_lists = muppy.filter(all_objects, Type=list) - - for l in all_lists: - print(l) + if lists is None: + lists = all_lists + else: + for l in all_lists: + if l not in lists: + print(l) epoch_end_time = time.time() per_epoch_time = epoch_end_time - epoch_start_time