[??] ??? ‘???? ????’ (??? ????)

paddle.linalg. slogdet ( x: Tensor, name: str | None = None ) Tensor [source]
百度 通过一段时间的交往,段某星为了博取女方信任,自称是工程老板、某企业执行董事等身份,账上有几百万的存款,名下拥有多套房产及门面店铺,为了更加直观的让女方信服,段某星制作了多本假房产证,商铺及商品房售房合同,以送房给女方,办理过户手续为由诈骗钱财。

Calculates the sign and natural logarithm of the absolute value of a square matrix’s or batches square matrices’ determinant. The determinant can be computed with sign * exp (logabsdet).

Supports input of float, double, complex64, complex128.

Notes

  1. For matrices that have zero determinant, this returns (0, -inf).

2. For matrices with complex value, the \(abs(det)\) is the modulus of the determinant, and therefore \(sign = det / abs(det)\).

Parameters
  • x (Tensor) – the batch of matrices of size \((*, n, n)\) where math:* is one or more batch dimensions.

  • name (str|None, optional) – Name of the output.It’s used to print debug info for developers. Details: Name. Default is None.

Returns

y (Tensor), A tensor containing the sign of the determinant and the natural logarithm of the absolute value of determinant, respectively. The output shape is \((2, *)\), where math:* is one or more batch dimensions of the input x.

Examples

>>> import paddle
>>> paddle.seed(2023)
>>> x = paddle.randn([3, 3, 3])
>>> A = paddle.linalg.slogdet(x)
>>> print(A)
Tensor(shape=[2, 3], dtype=float32, place=Place(cpu), stop_gradient=True,
[[-1.        ,  1.        ,  1.        ],
 [ 0.25681755, -0.25061053, -0.10809582]])