@ -183,8 +183,6 @@ 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:
|
||||||
@ -218,11 +216,9 @@ 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:
|
for i, l in enumerate(all_lists):
|
||||||
lists = set(map(tuple, all_lists))
|
with open(f"list-{i}.txt", "w") as file:
|
||||||
else:
|
file.write(str(l))
|
||||||
all_lists = set(map(tuple, all_lists))
|
|
||||||
print(all_lists.difference(lists))
|
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user