Added memory dump of objects

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-05-01 12:27:18 +02:00
parent 56fd5f6202
commit f4061e3332

View File

@ -213,6 +213,13 @@ def _predict_one_epoch(dataset: tf.data.Dataset,
context.context()._clear_caches() context.context()._clear_caches()
gc.collect() 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() epoch_end_time = time.time()
per_epoch_time = epoch_end_time - epoch_start_time per_epoch_time = epoch_end_time - epoch_start_time