From e860a5d0c2d3fa2fe248b60a1560d73024079acd Mon Sep 17 00:00:00 2001 From: qingqing01 Date: Fri, 31 Aug 2018 20:29:54 +0800 Subject: [PATCH] Fix flowers dataset in relase/0.15.0 (#13091) * Fix bug in flowers dataset. (#13024) --- python/paddle/dataset/image.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/paddle/dataset/image.py b/python/paddle/dataset/image.py index b32736ee7..920dbf3b4 100644 --- a/python/paddle/dataset/image.py +++ b/python/paddle/dataset/image.py @@ -203,7 +203,7 @@ def resize_short(im, size): h_new = size * h // w else: w_new = size * w // h - im = cv2.resize(im, (h_new, w_new), interpolation=cv2.INTER_CUBIC) + im = cv2.resize(im, (w_new, h_new), interpolation=cv2.INTER_CUBIC) return im @@ -345,7 +345,6 @@ def simple_transform(im, if np.random.randint(2) == 0: im = left_right_flip(im, is_color) else: - im = center_crop(im, crop_size, is_color) im = center_crop(im, crop_size, is_color=is_color) if len(im.shape) == 3: im = to_chw(im) -- GitLab