Skip to content

Commit 72f8c30

Browse files
committed
fix the bug
1 parent 5ed1209 commit 72f8c30

File tree

2 files changed

+65
-3
lines changed

2 files changed

+65
-3
lines changed

python/paddle/tensor/__init__.py

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@
328328
from .math import i1e # noqa: F401
329329
from .math import polygamma # noqa: F401
330330
from .math import polygamma_ # noqa: F401
331+
from .math import renorm # noqa: F401
332+
from .math import renorm_ # noqa: F401
331333

332334
from .random import multinomial # noqa: F401
333335
from .random import standard_normal # noqa: F401
@@ -376,6 +378,9 @@
376378

377379
from .einsum import einsum # noqa: F401
378380

381+
from ..signal import istft # noqa: F401
382+
from ..signal import stft # noqa: F401
383+
379384
# this list used in math_op_patch.py for _binary_creator_
380385
tensor_method_func = [ # noqa
381386
'create_parameter',
@@ -409,6 +414,7 @@
409414
'all',
410415
'any',
411416
'asin',
417+
'asin_',
412418
'atan',
413419
'ceil',
414420
'ceil_',
@@ -492,8 +498,6 @@
492498
'add_',
493499
'subtract',
494500
'subtract_',
495-
'atan',
496-
'logsumexp',
497501
'inverse',
498502
'log1p',
499503
'log1p_',
@@ -632,6 +636,7 @@
632636
'triangular_solve',
633637
'asinh',
634638
'atanh',
639+
'atanh_',
635640
'acosh',
636641
'lu',
637642
'lu_unpack',
@@ -687,6 +692,61 @@
687692
'i1e',
688693
'polygamma',
689694
'polygamma_',
695+
'atan2',
696+
'diagflat',
697+
'multinomial',
698+
'pinv',
699+
'renorm',
700+
'renorm_',
701+
'tan',
702+
'tan_',
703+
'tril',
704+
'tril_',
705+
'triu',
706+
'triu_',
707+
'stft',
708+
'istft',
709+
'abs_',
710+
'acos_',
711+
'atan_',
712+
'cos_',
713+
'cosh_',
714+
'sin_',
715+
'sinh_',
716+
'acosh_',
717+
'asinh_',
718+
'diag',
719+
'eye',
720+
'linspace',
721+
'fill_constant',
722+
'ones',
723+
'ones_like',
724+
'zeros',
725+
'zeros_like',
726+
'arange',
727+
'full',
728+
'full_like',
729+
'meshgrid',
730+
'empty',
731+
'empty_like',
732+
'complex',
733+
'eigh',
734+
'standard_normal',
735+
'normal',
736+
'uniform',
737+
'randn',
738+
'rand',
739+
'randint',
740+
'randint_like',
741+
'randperm',
742+
'poisson',
743+
'searchsorted',
744+
'set_printoptions',
745+
'array_length',
746+
'array_read',
747+
'array_write',
748+
'create_array',
749+
'einsum',
690750
'normal_',
691751
]
692752

python/paddle/tensor/manipulation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1984,8 +1984,10 @@ def split(x, num_or_sections, axis=0, name=None):
19841984
dim = (len(input.shape) + dim) if dim < 0 else dim
19851985

19861986
if isinstance(num_or_sections, int):
1987+
dim = dim if dim >= 0 else dim + len(input.shape)
19871988
return _C_ops.split_with_num(input, num_or_sections, dim)
19881989
else:
1990+
dim = dim if dim >= 0 else dim + len(input.shape)
19891991
return _C_ops.split(input, num_or_sections, dim)
19901992

19911993
else:
@@ -3168,7 +3170,7 @@ def tile(x, repeat_times, name=None):
31683170
# Tensor(shape=[1, 6], dtype=int32, place=Place(gpu:0), stop_gradient=True,
31693171
# [[1, 2, 3, 1, 2, 3]])
31703172
"""
3171-
if in_dynamic_mode():
3173+
if in_dynamic_or_pir_mode():
31723174
if isinstance(repeat_times, core.eager.Tensor):
31733175
assert (
31743176
repeat_times.ndim == 1

0 commit comments

Comments
 (0)