From e0feb7d72ce54ee4f9e84792418b4c59c4013d5f Mon Sep 17 00:00:00 2001 From: Finnian Anderson Date: Tue, 10 Oct 2017 12:15:13 +0100 Subject: [PATCH] Fix default mode warning in io.resize_image Signed-off-by: Finnian Anderson --- python/caffe/io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/caffe/io.py b/python/caffe/io.py index 966c164cffd..d61f765b894 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