Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
a162837 committed Nov 5, 2024
1 parent 549adee commit 96632f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/paddle/tensor/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -3831,9 +3831,9 @@ def clip(

else:
if in_dynamic_or_pir_mode():
if isinstance(min, Variable, paddle.pir.Value):
if isinstance(min, (Variable, paddle.pir.Value)):
min = min.item()
if isinstance(max, Variable, paddle.pir.Value):
if isinstance(max, (Variable, paddle.pir.Value)):
max = max.item()
min = min_ if min is None else min
max = max_ if max is None else max
Expand Down

0 comments on commit 96632f6

Please sign in to comment.