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
#> nan
#> 0.9079
#> -0.6770
#> 0.4305
#> nan
#> [ CPUFloatType{5} ]