summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Donahue <jeff.donahue@gmail.com>2015-09-16 18:24:27 (GMT)
committerJeff Donahue <jeff.donahue@gmail.com>2015-09-16 18:24:27 (GMT)
commit71e05876f644a08af4cb1c955d01c5a272539e96 (patch)
tree5e1810fefb7fd9b32f94d94f21be36b6e35f47f5
parente4baef28d6969cba1b656c7e7d525d877826c251 (diff)
parentb7f9cba875c6db5c4ae33446dc80cd010c1c392c (diff)
downloadcaffeonacl-71e05876f644a08af4cb1c955d01c5a272539e96.zip
caffeonacl-71e05876f644a08af4cb1c955d01c5a272539e96.tar.gz
caffeonacl-71e05876f644a08af4cb1c955d01c5a272539e96.tar.bz2
Merge pull request #3070 from mohomran/resize_nd-image_bug
bug in caffe.io.resize_image when applied to images with 2 or >3 channels
-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)