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.
$$
y_{i} = \ln(\frac{z_{i}}{1 - z_{i}}) \\
z_{i} = \begin{array}{ll}
x_{i} & \mbox{if eps is None} \\
\mbox{eps} & \mbox{if } x_{i} < \mbox{eps} \\
x_{i} & \mbox{if } \mbox{eps} \leq x_{i} \leq 1 - \mbox{eps} \\
1 - \mbox{eps} & \mbox{if } x_{i} > 1 - \mbox{eps}
\end{array}
$$