torch_log function

Log

Log

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.

yi=loge(xi) y_{i} = \log_{e} (x_{i})

Examples

if (torch_is_installed()) { a = torch_randn(c(5)) a torch_log(a) }
  • Maintainer: Daniel Falbel
  • License: MIT + file LICENSE
  • Last published: 2025-02-14