From 9eee6fed39e01448eb19b25a0103ab952883eb13 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 15 Jan 2020 21:12:04 +0100 Subject: params... --- cli/app/search/search_dense.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cli/app/search/search_dense.py') 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(): -- cgit v1.2.3-70-g09d2