Removed debug prints

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-05-01 16:42:57 +02:00
parent e8a0df0477
commit 1a4007dcb9

View File

@ -181,12 +181,8 @@ def _predict_one_epoch(dataset: tf.data.Dataset,
# go through the data set # go through the data set
counter = 0 counter = 0
import gc import gc
from pympler import tracker
from tensorflow.python.eager import context from tensorflow.python.eager import context
trs = tracker.SummaryTracker()
for inputs in dataset: for inputs in dataset:
decoded_predictions_batch = [] decoded_predictions_batch = []
if use_dropout: if use_dropout:
@ -195,8 +191,6 @@ def _predict_one_epoch(dataset: tf.data.Dataset,
decoded_predictions_batch.append(result) decoded_predictions_batch.append(result)
del result del result
else: else:
import pdb
pdb.set_trace()
result = np.array(ssd(inputs)) result = np.array(ssd(inputs))
decoded_predictions_batch.append(result) decoded_predictions_batch.append(result)
del result del result
@ -214,14 +208,10 @@ def _predict_one_epoch(dataset: tf.data.Dataset,
np.save(file, decoded_predictions_batch_np, allow_pickle=False, fix_imports=False) np.save(file, decoded_predictions_batch_np, allow_pickle=False, fix_imports=False)
counter += 1 counter += 1
trs.print_diff()
tf.set_random_seed(1) tf.set_random_seed(1)
context.context()._clear_caches() context.context()._clear_caches()
gc.collect() gc.collect()
trs.print_diff()
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