jax.nn.log_softmax
Warning
This page was created from a pull request (#9655).
jax.nn.log_softmaxΒΆ
- jax.nn.log_softmax(x, axis=- 1, where=None, initial=None)[source]ΒΆ
Log-Softmax function.
Computes the logarithm of the
softmaxfunction, which rescales elements to the range \([-\infty, 0)\).\[\mathrm{log\_softmax}(x) = \log \left( \frac{\exp(x_i)}{\sum_j \exp(x_j)} \right)\]- Parameters
x (
Any) β input arrayaxis (
Union[int,Tuple[int, β¦],None]) β the axis or axes along which thelog_softmaxshould be computed. Either an integer or a tuple of integers.where (
Optional[Any]) β Elements to include in thelog_softmax.initial (
Optional[Any]) β The minimum value used to shift the input array. Must be present whenwhereis not None.
- Return type