diff --git a/python/paddle/v2/image.py b/python/paddle/v2/image.py index 1429d6b1e08fe4ab2d1c5a0f19f1cedbcbc85abd..a7bb22a35519b87e196b014056649f3a1bfa504a 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)