log_softmax

dragon.vm.torch.nn.functional.log_softmax(
  input,
  dim
)[source]

Apply the composite of logarithm and softmax to input.

The LogSoftmax function is defined as:

\[\text{LogSoftmax}(x) = \log(\frac{e^{x_{i}}}{\sum e^{x_{j}}}) \]
Parameters:
Returns:

dragon.vm.torch.Tensor – The output tensor.