From f4061e3332a2d2ab92968db8ae07e9196acf83a2 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Wed, 1 May 2019 12:27:18 +0200 Subject: [PATCH] Added memory dump of objects Signed-off-by: Jim Martens --- src/twomartens/masterthesis/ssd.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/twomartens/masterthesis/ssd.py b/src/twomartens/masterthesis/ssd.py index 5a25014..fee14a9 100644 --- a/src/twomartens/masterthesis/ssd.py +++ b/src/twomartens/masterthesis/ssd.py @@ -212,6 +212,13 @@ def _predict_one_epoch(dataset: tf.data.Dataset, tf.set_random_seed(1) context.context()._clear_caches() gc.collect() + + from pympler import muppy, summary + all_objects = muppy.get_objects() + sum1 = summary.summarize(all_objects) + + # Prints out a summary of the large objects + summary.print_(sum1) epoch_end_time = time.time() per_epoch_time = epoch_end_time - epoch_start_time