function softmax_(logits, dim = -1) {
    const $logits = (0, _tensorUtilEnv.convertToTensor)(logits, "logits", "softmax", "float32");
    if (dim === -1) dim = $logits.rank - 1;
    if (dim !== $logits.rank - 1) throw Error("Softmax along a non-last dimension is not yet supported. " + `Logits was rank ${$logits.rank} and dim was ${dim}`);
    const inputs = {
        logits: $logits
    };
    const attrs = {
        dim
    };
    return (0, _engine.ENGINE).runKernel((0, _kernelNames.Softmax), inputs, attrs);
}
Computes the softmax normalized vector given the logits.

```js
const a = tf.tensor1d([1, 2, 3]);

a.softmax().print();  // or tf.softmax(a)
```

```js
const a = tf.tensor2d([2, 4, 6, 1, 2, 3], [2, 3]);

a.softmax().print();  // or tf.softmax(a)
```

@param logits The logits array.
@param dim The dimension softmax would be performed on. Defaults to `-1`
    which indicates the last dimension.

@doc {heading: 'Operations', subheading: 'Normalization'}