diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-15 21:12:04 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-15 21:12:04 +0100 |
| commit | 9eee6fed39e01448eb19b25a0103ab952883eb13 (patch) | |
| tree | 441c8acacf86b06a24d16e29bad71ac450250976 | |
| parent | 4e3ee5ff3090f69b55aa41741d77689ad076eee7 (diff) | |
params...
| -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(): |
