summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohamed Omran <mohamed.omran@gmail.com>2015-09-15 15:18:32 (GMT)
committerMohamed Omran <mohamed.omran@gmail.com>2015-09-15 15:18:32 (GMT)
commitb7f9cba875c6db5c4ae33446dc80cd010c1c392c (patch)
tree5e1810fefb7fd9b32f94d94f21be36b6e35f47f5
parente4baef28d6969cba1b656c7e7d525d877826c251 (diff)
downloadcaffeonacl-b7f9cba875c6db5c4ae33446dc80cd010c1c392c.zip
caffeonacl-b7f9cba875c6db5c4ae33446dc80cd010c1c392c.tar.gz
caffeonacl-b7f9cba875c6db5c4ae33446dc80cd010c1c392c.tar.bz2
removed bug in caffe.io.resize_image when applied to Nd images
-rw-r--r--python/caffe/io.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/caffe/io.py b/python/caffe/io.py
index fc96266..0cad721 100644
--- a/python/caffe/io.py
+++ b/python/caffe/io.py
@@ -329,7 +329,7 @@ def resize_image(im, new_dims, interp_order=1):
return ret
else:
# ndimage interpolates anything but more slowly.
- scale = tuple(np.array(new_dims) / np.array(im.shape[:2]))
+ scale = tuple(np.array(new_dims, dtype=float) / np.array(im.shape[:2]))
resized_im = zoom(im, scale + (1,), order=interp_order)
return resized_im.astype(np.float32)