[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.nn.log_softmax\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 2 version](/api_docs/python/tf/nn/log_softmax) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/nn_ops.py#L2988-L3015) |\n\nComputes log softmax activations. (deprecated arguments)\n\n#### View aliases\n\n\n**Main aliases**\n\n[`tf.math.log_softmax`](/api_docs/python/tf/nn/log_softmax)\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.math.log_softmax`](/api_docs/python/tf/compat/v1/math/log_softmax), [`tf.compat.v1.nn.log_softmax`](/api_docs/python/tf/compat/v1/math/log_softmax)\n\n\u003cbr /\u003e\n\n tf.nn.log_softmax(\n logits, axis=None, name=None, dim=None\n )\n\n| **Warning:** SOME ARGUMENTS ARE DEPRECATED: `(dim)`. They will be removed in a future version. Instructions for updating: dim is deprecated, use axis instead\n\nFor each batch `i` and class `j` we have \n\n logsoftmax = logits - log(reduce_sum(exp(logits), axis))\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------|----------------------------------------------------------------------------------------------------|\n| `logits` | A non-empty `Tensor`. Must be one of the following types: `half`, `float32`, `float64`. |\n| `axis` | The dimension softmax would be performed on. The default is -1 which indicates the last dimension. |\n| `name` | A name for the operation (optional). |\n| `dim` | Deprecated alias for `axis`. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor`. Has the same type as `logits`. Same shape as `logits`. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|------------------------|--------------------------------------------------------------------------|\n| `InvalidArgumentError` | if `logits` is empty or `axis` is beyond the last dimension of `logits`. |\n\n\u003cbr /\u003e"]]