summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 966c164c..d61f765b 100644
--- a/python/caffe/io.py
+++ b/python/caffe/io.py
@@ -323,7 +323,7 @@ def resize_image(im, new_dims, interp_order=1):
# skimage is fast but only understands {1,3} channel images
# in [0, 1].
im_std = (im - im_min) / (im_max - im_min)
- resized_std = resize(im_std, new_dims, order=interp_order)
+ resized_std = resize(im_std, new_dims, order=interp_order, mode='constant')
resized_im = resized_std * (im_max - im_min) + im_min
else:
# the image is a constant -- avoid divide by 0