From 0392ea164f371fb28b1d18a860ea73d91bb735dc Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Wed, 1 May 2019 12:45:21 +0200 Subject: [PATCH] Print new lists after one iteration and garbage collection Signed-off-by: Jim Martens --- src/twomartens/masterthesis/ssd.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/twomartens/masterthesis/ssd.py b/src/twomartens/masterthesis/ssd.py index 4f66cfc..ac55d24 100644 --- a/src/twomartens/masterthesis/ssd.py +++ b/src/twomartens/masterthesis/ssd.py @@ -219,11 +219,10 @@ def _predict_one_epoch(dataset: tf.data.Dataset, all_objects = muppy.get_objects() all_lists = muppy.filter(all_objects, Type=list) if lists is None: - lists = all_lists + lists = set(all_lists) else: - for l in all_lists: - if l not in lists: - print(l) + all_lists = set(all_lists) + print(all_lists.difference(lists)) epoch_end_time = time.time() per_epoch_time = epoch_end_time - epoch_start_time