det

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

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

Parameters

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

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])