-
Notifications
You must be signed in to change notification settings - Fork 6k
[API Compatibility] instance_norm/to_empty/linalg.det/gumbel_softmax/vstack/addcdiv/batch_norm/set_default_device/set_grad_enabled/new_tensor/_Loss/_pair/histc/hstack/true_divide_/linalg.eigh/Tensor.H/ELU/relu6/clamp_max/qr/logdet/linalg.cholesky/elu/tensordot/prelu/expand_copy/linalg.qr/clamp_ #79383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
d32d979
13328d3
5aafa15
69a736f
0e0271e
99525a9
d7fac5c
529f31b
64633da
9b0e602
edc5ca4
e3eaea1
0f878b1
ab8651f
251a608
32341de
69fc6e1
d1cc20e
87951f0
699f2d1
97b81d8
fd11da6
91796ff
d5b02da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -287,6 +287,13 @@ | |
| args_alias : | ||
| use_default_mapping : True | ||
|
|
||
| - op : cholesky | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里把 建议形态: @ParamAliasDecorator({"x": ["input"]})
def cholesky(x, upper=False, name=None, *, out=None):
if in_dynamic_or_pir_mode():
result = _C_ops.cholesky(x, upper)
else:
check_variable_and_dtype(x, 'dtype', ['float32', 'float64'], 'cholesky')
check_type(upper, 'upper', bool, 'cholesky')
helper = LayerHelper('cholesky', **locals())
result = helper.create_variable_for_type_inference(dtype=x.dtype)
helper.append_op(
type='cholesky',
inputs={'X': [x]},
outputs={'Out': result},
attrs={'upper': upper},
)
if out is not None:
paddle.assign(result, out)
return out
return result |
||
| name : [paddle.cholesky, paddle.linalg.cholesky, paddle.Tensor.cholesky] | ||
| args_alias : | ||
| use_default_mapping : True | ||
| pre_process : | ||
| func : CholeskyPreProcess(x, upper) | ||
|
|
||
| - op : conj | ||
| name: [paddle.conj, paddle.Tensor.conj] | ||
| args_alias : | ||
|
|
@@ -325,12 +332,24 @@ | |
| axis1 : [dim1] | ||
| axis2 : [dim2] | ||
|
|
||
| - op : det | ||
| name : [paddle.det, paddle.linalg.det, paddle.Tensor.det] | ||
| args_alias : | ||
| x : [input, A] | ||
|
|
||
| - op : dot | ||
| name : [paddle.dot, paddle.Tensor.dot] | ||
| args_alias : | ||
| x : [input] | ||
| y : [tensor] | ||
|
|
||
| - op : eigh | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里把 建议形态: @ParamAliasDecorator({"x": ["input"]})
def eigh(x, UPLO='L', name=None, *, out=None):
_check_eigh_input(x, UPLO)
if in_dynamic_or_pir_mode():
result = _C_ops.eigh(x, UPLO)
else:
check_variable_and_dtype(x, 'dtype', ['float32', 'float64', 'complex64', 'complex128'], 'eigh')
helper = LayerHelper('eigh', **locals())
out_w = helper.create_variable_for_type_inference(dtype=x.dtype)
out_v = helper.create_variable_for_type_inference(dtype=x.dtype)
helper.append_op(
type='eigh',
inputs={'X': x},
outputs={'Eigenvalues': out_w, 'Eigenvectors': out_v},
attrs={'UPLO': UPLO},
)
result = (out_w, out_v)
if out is not None:
paddle.assign(result[0], out[0])
paddle.assign(result[1], out[1])
return out
return result |
||
| name : [paddle.linalg.eigh, paddle.Tensor.eigh] | ||
| args_alias : | ||
| use_default_mapping : True | ||
| pre_process : | ||
| func : EighPreProcess(x, UPLO) | ||
|
|
||
| - op : erf | ||
| name : [paddle.erf, paddle.Tensor.erf] | ||
| args_alias : | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -515,6 +515,7 @@ def new_init(self, *args, **kwargs): | |||
| dstack, | ||||
| expand, | ||||
| expand_as, | ||||
| expand_copy, | ||||
| flatten, | ||||
| flatten_, | ||||
| flip, | ||||
|
|
@@ -623,6 +624,7 @@ def new_init(self, *args, **kwargs): | |||
| cartesian_prod, | ||||
| ceil, | ||||
| clip, | ||||
| clip_, | ||||
| combinations, | ||||
| conj, | ||||
| copysign, | ||||
|
|
@@ -768,6 +770,7 @@ def new_init(self, *args, **kwargs): | |||
| trace, | ||||
| trapezoid, | ||||
| true_divide, | ||||
| true_divide_, | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里新增从
Suggested change
同时在下面 alias 区域补上: true_divide_ = divide_
This comment was marked as outdated.
Sorry, something went wrong. |
||||
| trunc, | ||||
| trunc_, | ||||
| vander, | ||||
|
|
@@ -1055,6 +1058,7 @@ def __dir__(self): | |||
| concatenate = concat | ||||
| take_along_dim = take_along_axis | ||||
| clamp = clip | ||||
| clamp_ = clip_ | ||||
| ger = outer | ||||
| div = divide | ||||
| div_ = divide_ | ||||
|
|
@@ -1080,6 +1084,67 @@ def __dir__(self): | |||
| negative_ = neg_ | ||||
| pinverse = pinv | ||||
|
|
||||
|
|
||||
| def clamp_max(x, max=None, *, out=None): | ||||
| """ | ||||
| Clamps all elements in input into the range [min=None, max]. | ||||
|
|
||||
| This is a wrapper around ``paddle.clip`` that only sets the upper bound. | ||||
|
|
||||
| Args: | ||||
| x (Tensor): The input Tensor. Alias: input. | ||||
| max (float|Tensor): The upper bound. | ||||
| out (Tensor|None, optional): The output Tensor. Default: None. | ||||
|
|
||||
| Returns: | ||||
| Tensor: The clamped Tensor. | ||||
| """ | ||||
| return clip(x, min=None, max=max, name=None, out=out) | ||||
|
|
||||
|
|
||||
| def qr(input, some=True, *, out=None): | ||||
| """ | ||||
| Computes the QR decomposition of one or a batch of matrices. | ||||
|
|
||||
| This is a wrapper around ``paddle.linalg.qr`` with PyTorch-compatible | ||||
| ``some`` parameter. | ||||
|
|
||||
| Args: | ||||
| input (Tensor): The input tensor of shape ``[*, M, N]``. | ||||
| some (bool, optional): Controls the shape of Q and R. If ``True`` (default), | ||||
| returns reduced QR (Q: ``[*, M, K]``, R: ``[*, K, N]`` where ``K = min(M, N)``). | ||||
| If ``False``, returns complete QR (Q: ``[*, M, M]``, R: ``[*, M, N]``). | ||||
| out (tuple[Tensor, Tensor]|None, optional): The output tuple of (Q, R). Default: None. | ||||
|
|
||||
| Returns: | ||||
| tuple[Tensor, Tensor]: A tuple (Q, R). | ||||
| """ | ||||
| return linalg.qr( | ||||
| input, | ||||
| mode='reduced' if some else 'complete', | ||||
| out=out, | ||||
| ) | ||||
|
|
||||
|
|
||||
| def logdet(x, name=None): | ||||
| """ | ||||
| Computes the natural logarithm of the determinant of a square matrix or | ||||
| batches of square matrices. | ||||
|
|
||||
| For matrices with negative determinant, returns ``nan``. | ||||
| For matrices with zero determinant, returns ``-inf``. | ||||
|
|
||||
| Args: | ||||
| x (Tensor): The input tensor of shape ``[*, n, n]`` where ``*`` | ||||
| is zero or more batch dimensions. | ||||
| name (str|None, optional): Name for the operation. Default: None. | ||||
|
|
||||
| Returns: | ||||
| Tensor: The log-determinant of ``x``, with shape ``[*]``. | ||||
| """ | ||||
| return linalg.det(x).log() | ||||
|
|
||||
|
|
||||
| __all__ = [ | ||||
| 'block_diag', | ||||
| 'gt', | ||||
|
|
@@ -1215,7 +1280,10 @@ def __dir__(self): | |||
| 'less_', | ||||
| 'kron', | ||||
| 'clip', | ||||
| 'clip_', | ||||
| 'clamp', | ||||
| 'clamp_', | ||||
| 'clamp_max', | ||||
| 'Tensor', | ||||
| 'FloatTensor', | ||||
| 'DoubleTensor', | ||||
|
|
@@ -1329,6 +1397,7 @@ def __dir__(self): | |||
| 'CPUPlace', | ||||
| 'matmul', | ||||
| 'pinverse', | ||||
| 'qr', | ||||
| 'seed', | ||||
| 'acos', | ||||
| 'acos_', | ||||
|
|
@@ -1377,6 +1446,7 @@ def __dir__(self): | |||
| 'sub', | ||||
| 'sub_', | ||||
| 'true_divide', | ||||
| 'true_divide_', | ||||
| 'gammaln', | ||||
| 'gammaln_', | ||||
| 'ceil', | ||||
|
|
@@ -1457,6 +1527,7 @@ def __dir__(self): | |||
| 'set_default_tensor_type', | ||||
| 'disable_signal_handler', | ||||
| 'expand_as', | ||||
| 'expand_copy', | ||||
| 'stack', | ||||
| 'hstack', | ||||
| 'vstack', | ||||
|
|
@@ -1488,6 +1559,7 @@ def __dir__(self): | |||
| 'cosh', | ||||
| 'log', | ||||
| 'log_', | ||||
| 'logdet', | ||||
| 'log2', | ||||
| 'log2_', | ||||
| 'log10', | ||||
|
|
||||
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.