Skip to content

Commit b7caa20

Browse files
committed
fix paddle gather axis bug
1 parent e02ddf2 commit b7caa20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorlayerx/backend/ops/paddle_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,10 +1211,10 @@ def floor(x):
12111211

12121212

12131213
def gather(params, indices, axis=None):
1214-
if axis < 0:
1215-
axis = len(params.shape) + axis
12161214
if axis is None:
12171215
axis = 0
1216+
if axis < 0:
1217+
axis = len(params.shape) + axis
12181218
return pd.gather(params, indices, axis)
12191219

12201220

0 commit comments

Comments
 (0)