Learn R Programming

torch (version 0.8.1)

torch_lgamma: Lgamma

Description

Lgamma

Usage

torch_lgamma(self)

Arguments

self

(Tensor) the input tensor.

lgamma(input, out=NULL) -> Tensor

Computes the logarithm of the gamma function on input.

$$ \mbox{out}_{i} = \log \Gamma(\mbox{input}_{i}) $$

Examples

Run this code
if (torch_is_installed()) {

a = torch_arange(0.5, 2, 0.5)
torch_lgamma(a)
}

Run the code above in your browser using DataLab