summaryrefslogtreecommitdiff
path: root/cli/app/search/search_dense.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-01-15 22:49:44 +0100
committerJules Laplace <julescarbon@gmail.com>2020-01-15 22:49:44 +0100
commitad434493fe0203e632d7e7abeae0ce339d0a26bb (patch)
tree7cba112835ffc34387da73b377684a162aedd077 /cli/app/search/search_dense.py
parent0e996eed57590c294f1995b379fb116dee400a1e (diff)
params...
Diffstat (limited to 'cli/app/search/search_dense.py')
-rw-r--r--cli/app/search/search_dense.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/app/search/search_dense.py b/cli/app/search/search_dense.py
index 5aee392..6fba70d 100644
--- a/cli/app/search/search_dense.py
+++ b/cli/app/search/search_dense.py
@@ -340,15 +340,15 @@ def find_dense_embedding_for_images(params, opt_tag="inverse_" + timestamp(), op
i_1, i_2 = i*BATCH_SIZE, (i+1)*BATCH_SIZE
yield sample_latents[i_1:i_2]
latent_gen = sample_latent_gen()
- TOTAL_IMGS = NUM_IMGS
- while TOTAL_IMGS % BATCH_SIZE != 0:
+ INFILL_IMGS = NUM_IMGS
+ while INFILL_IMGS % BATCH_SIZE != 0:
REMAINDER = 1 # BATCH_SIZE - (NUM_IMGS % BATCH_SIZE)
- TOTAL_IMGS += REMAINDER
+ INFILL_IMGS += REMAINDER
sample_images = np.append(sample_images, sample_images[-REMAINDER:,...], axis=0)
sample_labels = np.append(sample_labels, sample_labels[-REMAINDER:,...], axis=0)
sample_latents = np.append(sample_latents, sample_latents[-REMAINDER:,...], axis=0)
sample_fns = np.append(sample_fns, sample_fns[-REMAINDER:], axis=0)
- assert(NUM_IMGS % BATCH_SIZE == 0)
+ assert(INFILL_IMGS % BATCH_SIZE == 0)
else:
sys.exit('Unknown dataset {}.'.format(params.dataset))