summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-01-15 21:12:04 +0100
committerJules Laplace <julescarbon@gmail.com>2020-01-15 21:12:04 +0100
commit9eee6fed39e01448eb19b25a0103ab952883eb13 (patch)
tree441c8acacf86b06a24d16e29bad71ac450250976
parent4e3ee5ff3090f69b55aa41741d77689ad076eee7 (diff)
params...
-rw-r--r--cli/app/search/search_dense.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/app/search/search_dense.py b/cli/app/search/search_dense.py
index ecce837..56228cd 100644
--- a/cli/app/search/search_dense.py
+++ b/cli/app/search/search_dense.py
@@ -327,6 +327,9 @@ def find_dense_embedding_for_images(params, opt_tag="inverse_" + timestamp(), op
sample_labels = in_file['ytrain'][()]
sample_fns = in_file['fn'][()]
NUM_IMGS = sample_images.shape[0] # number of images to be inverted.
+ if NUM_IMGS < BATCH_SIZE:
+ BATCH_SIZE = NUM_IMGS
+ SAMPLE_SIZE = NUM_IMS
print("Number of images: {}".format(NUM_IMGS))
print("Batch size: {}".format(BATCH_SIZE))
def sample_images_gen():