From 992f20ce7a770ad3c5b5c20f57ab27910ce07abf Mon Sep 17 00:00:00 2001 From: yeyupiaoling Date: Mon, 22 Jan 2018 23:58:18 +0800 Subject: [PATCH] fix decode bug #7741 --- python/paddle/v2/image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/v2/image.py b/python/paddle/v2/image.py index 1429d6b1e08..a7bb22a3551 100644 --- a/python/paddle/v2/image.py +++ b/python/paddle/v2/image.py @@ -319,11 +319,11 @@ def simple_transform(im, """ im = resize_short(im, resize_size) if is_train: - im = random_crop(im, crop_size) + im = random_crop(im, crop_size, is_color=is_color) if np.random.randint(2) == 0: im = left_right_flip(im) else: - im = center_crop(im, crop_size) + im = center_crop(im, crop_size, is_color=is_color) if len(im.shape) == 3: im = to_chw(im) -- GitLab