From 253a507c90e36c5ad1b0f8978609f17d21f1898c Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Wed, 10 Jul 2019 17:36:33 +0200 Subject: [PATCH] Fixed indexing of instance array Signed-off-by: Jim Martens --- src/twomartens/masterthesis/debug.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/twomartens/masterthesis/debug.py b/src/twomartens/masterthesis/debug.py index 025e19d..acc1687 100644 --- a/src/twomartens/masterthesis/debug.py +++ b/src/twomartens/masterthesis/debug.py @@ -78,11 +78,10 @@ def save_ssd_train_images(images: np.ndarray, labels: np.ndarray, ymax = instance[4] else: instance = np.asarray(instance) - print(instance.shape) class_id = np.argmax(instance[:-12], axis=0) instance[-12:-8] *= instance[-4:] # multiply with variances - instance[-11, -9] *= np.expand_dims(instance[-5] - instance[-7], axis=-1) - instance[-12, -10] *= np.expand_dims(instance[-6] - instance[-8], axis=-1) + instance[[-11, -9]] *= np.expand_dims(instance[-5] - instance[-7], axis=-1) + instance[[-12, -10]] *= np.expand_dims(instance[-6] - instance[-8], axis=-1) instance[-12:-8] += instance[-8:-4] instance[-12:-8] *= image_size