From a9ad91060377fa2536af89ede1049b5a73830232 Mon Sep 17 00:00:00 2001 From: LielinJiang <50691816+LielinJiang@users.noreply.github.com> Date: Fri, 2 Aug 2019 13:17:45 +0800 Subject: [PATCH] Fix warning of slice op (#3004) --- PaddleCV/deeplabv3+/reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PaddleCV/deeplabv3+/reader.py b/PaddleCV/deeplabv3+/reader.py index 9220b912..bb946662 100644 --- a/PaddleCV/deeplabv3+/reader.py +++ b/PaddleCV/deeplabv3+/reader.py @@ -38,7 +38,7 @@ def slice_with_pad(a, s, value=0): pads.append([pl, pr]) slices.append([l, r]) slices = list(map(lambda x: slice(x[0], x[1], 1), slices)) - a = a[slices] + a = a[tuple(slices)] a = np.pad(a, pad_width=pads, mode='constant', constant_values=value) return a -- GitLab