Improved debug print

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-05-01 12:36:35 +02:00
parent 3237b94fd7
commit c51836f553

View File

@ -183,6 +183,8 @@ def _predict_one_epoch(dataset: tf.data.Dataset,
import gc import gc
from tensorflow.python.eager import context from tensorflow.python.eager import context
lists = None
for inputs in dataset: for inputs in dataset:
decoded_predictions_batch = [] decoded_predictions_batch = []
if use_dropout: if use_dropout:
@ -216,8 +218,11 @@ def _predict_one_epoch(dataset: tf.data.Dataset,
from pympler import muppy, summary from pympler import muppy, summary
all_objects = muppy.get_objects() all_objects = muppy.get_objects()
all_lists = muppy.filter(all_objects, Type=list) all_lists = muppy.filter(all_objects, Type=list)
if lists is None:
lists = all_lists
else:
for l in all_lists: for l in all_lists:
if l not in lists:
print(l) print(l)
epoch_end_time = time.time() epoch_end_time = time.time()