diff options
Diffstat (limited to 'cli/app/search/search_dense.py')
| -rw-r--r-- | cli/app/search/search_dense.py | 3 |
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(): |
