summaryrefslogtreecommitdiff
path: root/inversion
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-12-12 16:35:32 +0100
committerJules Laplace <julescarbon@gmail.com>2019-12-12 16:35:32 +0100
commit8dcb4c7efdbf64f89e0905a32e3e06e2f8feeb2a (patch)
tree8d5191c6a15f635f33f72fbec04d3abc6b6fd1c4 /inversion
parent49f139e6c75d93c86f093eaa9314db3edc7d6c28 (diff)
print timing
Diffstat (limited to 'inversion')
-rw-r--r--inversion/image_inversion_inception.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/inversion/image_inversion_inception.py b/inversion/image_inversion_inception.py
index c4eb5b5..92a472a 100644
--- a/inversion/image_inversion_inception.py
+++ b/inversion/image_inversion_inception.py
@@ -467,7 +467,9 @@ for image_batch, label_batch in image_gen:
# Save target images and reconstructions.
if params.save_progress:
assert SAMPLE_SIZE <= BATCH_SIZE
+ gen_time = time.time()
gen_images = sess.run(gen_img)
+ print("Generation time: {:.1f}s".format(time.time() - gen_time))
inv_batch = vs.interleave(vs.data2img(image_batch[BATCH_SIZE - SAMPLE_SIZE:]),
vs.data2img(gen_images[BATCH_SIZE - SAMPLE_SIZE:]))
inv_batch = vs.grid_transform(inv_batch)