Log1p
Note
This function is more accurate than torch_log
for small
values of input
Examples
if (torch_is_installed()) {
a = torch_randn(c(5))
a
torch_log1p(a)
}
#> torch_tensor
#> 0.6892
#> -0.7165
#> 0.8611
#> nan
#> nan
#> [ CPUFloatType{5} ]