slogdet

paddle.linalg. slogdet ( x, name=None ) [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)

System Message: WARNING/2 (/usr/local/lib/python3.8/site-packages/paddle/tensor/linalg.py:docstring of paddle.tensor.linalg.slogdet, line 1); backlink

Inline literal start-string without end-string.

Supports input of float, double

Note that for matrices that have zero determinant, this returns (0, -inf) :param x: the batch of matrices of size (,n,n)

System Message: ERROR/3 (/usr/local/lib/python3.8/site-packages/paddle/tensor/linalg.py:docstring of paddle.tensor.linalg.slogdet, line 8)

Unexpected indentation.

where math:* is one or more batch dimensions.

System Message: WARNING/2 (/usr/local/lib/python3.8/site-packages/paddle/tensor/linalg.py:docstring of paddle.tensor.linalg.slogdet, line 9)

Block quote ends without a blank line; unexpected unindent.

Returns

A tensor containing the sign of the determinant and the natural logarithm of the absolute value of determinant, respectively.

Return type

y (Tensor)

Examples: .. code-block:: python

import paddle

x = paddle.randn([3,3,3])

A = paddle.linalg.slogdet(x)

print(A)

# [[ 1. , 1. , -1. ], # [-0.98610914, -0.43010661, -0.10872950]])