Skip to content

Commit 89e65a2

Browse files
committed
Fix bug in flowers dataset. (#13024)
1 parent 4a64df6 commit 89e65a2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

python/paddle/dataset/image.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def resize_short(im, size):
203203
h_new = size * h // w
204204
else:
205205
w_new = size * w // h
206-
im = cv2.resize(im, (h_new, w_new), interpolation=cv2.INTER_CUBIC)
206+
im = cv2.resize(im, (w_new, h_new), interpolation=cv2.INTER_CUBIC)
207207
return im
208208

209209

@@ -345,7 +345,6 @@ def simple_transform(im,
345345
if np.random.randint(2) == 0:
346346
im = left_right_flip(im, is_color)
347347
else:
348-
im = center_crop(im, crop_size, is_color)
349348
im = center_crop(im, crop_size, is_color=is_color)
350349
if len(im.shape) == 3:
351350
im = to_chw(im)

0 commit comments

Comments
 (0)