Learn R Programming

torch (version 0.8.1)

torch_logdet: Logdet

Description

Logdet

Usage

torch_logdet(self)

Arguments

self

(Tensor) the input tensor of size (*, n, n) where * is zero or more batch dimensions.

logdet(input) -> Tensor

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

Examples

Run this code
if (torch_is_installed()) {

A = torch_randn(c(3, 3))
torch_det(A)
torch_logdet(A)
A
A$det()
A$det()$log()
}

Run the code above in your browser using DataLab