oneflow.nn.functional.log_softmax¶
-
oneflow.nn.functional.
log_softmax
(x: Tensor, dim: int) → Tensor¶ LogSoftmax is defined as:
\[\text{LogSoftmax}(x_{i}) = \log\left(\frac{\exp(x_i) }{ \sum_j \exp(x_j)} \right) = x_i - \log({ \sum_j \exp(x_j)})\]See
LogSoftmax
for more details.