det

paddle.linalg. det ( x, name=None ) [source]

Calculates determinant value of a square matrix or batches of square matrices.

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

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

Returns

Tensor, the determinant value of a square matrix or batches of square matrices.

Examples

import paddle

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

A = paddle.linalg.det(x)

print(A)

# [ 0.02547996,  2.52317095, -6.15900707])