torch_log: Log

Description Usage Arguments log(input, out=NULL) -> Tensor Examples

View source: R/gen-namespace.R

Description

Log

Usage

1
torch_log(self)

Arguments

self

(Tensor) the input tensor.

log(input, out=NULL) -> Tensor

Returns a new tensor with the natural logarithm of the elements of input.

y_{i} = \log_{e} (x_{i})

Examples

1
2
3
4
5
6
if (torch_is_installed()) {

a = torch_randn(c(5))
a
torch_log(a)
}

torch documentation built on Oct. 7, 2021, 9:22 a.m.