Skip to content

Commit

Permalink
polish code.
Browse files Browse the repository at this point in the history
  • Loading branch information
hbwx24 committed Aug 31, 2021
1 parent d2f5b38 commit 0023a3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/paddle/fluid/layers/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -10977,7 +10977,7 @@ def slice(input, axes, starts, ends):
ends_tensor = None

if isinstance(axes, (list, tuple)):
axes = axes if isinstance(axes, list) else list(axes)
axes = list(axes)
if len(axes) == 0:
raise ValueError(
"Input axes should not be an empty list/tuple.")
Expand Down

0 comments on commit 0023a3b

Please sign in to comment.