Removed extra garbage collection

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-05-22 13:59:21 +02:00
parent 1763fc5917
commit 11edf3772a

View File

@ -184,9 +184,6 @@ def _predict_one_epoch(dataset: tf.data.Dataset,
# go through the data set # go through the data set
counter = 0 counter = 0
import gc
from tensorflow.python.eager import context
for inputs, labels in dataset: for inputs, labels in dataset:
if use_dropout: if use_dropout:
@ -248,10 +245,6 @@ def _predict_one_epoch(dataset: tf.data.Dataset,
pickle.dump(labels, label_file) pickle.dump(labels, label_file)
counter += 1 counter += 1
tf.set_random_seed(1)
context.context()._clear_caches()
gc.collect()
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