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_{i}) = \log(\frac{\exp(x_{i})}{\sum \exp(x_{j})}) \]
Parameters:
Returns:

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