Logit
logit(input, eps=None, *, out=None) -> Tensor
Returns a new tensor with the logit of the elements of input.
input is clamped to [eps, 1 - eps] when eps is not None.
When eps is None and input < 0 or input > 1, the function will yields NaN.
Examples
if (torch_is_installed()) {
a <- torch_rand(5)
a
torch_logit(a, eps=1e-6)
}
#> torch_tensor
#> -1.9773
#> 0.0740
#> 4.6316
#> 2.3288
#> -1.3036
#> [ CPUFloatType{5} ]