diff options
| author | jules@lens <julescarbon@gmail.com> | 2019-12-11 21:23:35 +0100 |
|---|---|---|
| committer | jules@lens <julescarbon@gmail.com> | 2019-12-11 21:23:35 +0100 |
| commit | 24840cc289f87fb1d01659aaa6eb00f2003f44b1 (patch) | |
| tree | 5bb44cea3bce7abfd54692d4c065898e40c1c6ea | |
| parent | 121e283f88d09930e82045bf9b040ea07f9d21f5 (diff) | |
fix remainder
| -rw-r--r-- | inversion/image_inversion.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/inversion/image_inversion.py b/inversion/image_inversion.py index 274353b..5560172 100644 --- a/inversion/image_inversion.py +++ b/inversion/image_inversion.py @@ -328,9 +328,9 @@ if params.dataset.endswith('.hdf5'): if NUM_IMGS % BATCH_SIZE != 0: REMAINDER = BATCH_SIZE - (NUM_IMGS % BATCH_SIZE) NUM_IMGS += REMAINDER - sample_images += sample_images[-REMAINDER:] - sample_labels += sample_labels[-REMAINDER:] - sample_fns += sample_fns[-REMAINDER:] + sample_images = np.append(sample_images, sample_images[-REMAINDER:,...], axis=0) + sample_labels = np.append(sample_labels, sample_labels[-REMAINDER:,...], axis=0) + sample_fns = np.append(sample_fns, sample_fns[-REMAINDER:], axis=0) assert(NUM_IMGS % BATCH_SIZE == 0) else: sys.exit('Unknown dataset {}.'.format(params.dataset)) |
