Skip to content

Commit ba52aea

Browse files
committed
Fix
1 parent fb88432 commit ba52aea

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

python/paddle/nn/functional/common.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1959,11 +1959,8 @@ def pad(
19591959
], f"mode should be one of constant, reflect, replicate, circular, but got {mode}."
19601960

19611961
x_dim = len(x.shape)
1962-
if in_dynamic_or_pir_mode():
1963-
if (
1964-
isinstance(pad, (Variable, pir.Value, paddle.Tensor))
1965-
and pad.size == 0
1966-
):
1962+
if in_dynamic_mode():
1963+
if isinstance(pad, (Variable, paddle.Tensor)) and pad.size == 0:
19671964
return x.clone()
19681965
if (
19691966
mode == "constant"

0 commit comments

Comments
 (0)