softmax
softmax(z, i, k) ⇒ number
Normalized exponential function, converts vector of size K into probability distribution of K possible outcomes Useful in neural network implementations
Kind: global function
See: https://en.wikipedia.org/wiki/Softmax_function
Param | Type | Description |
---|---|---|
z | Array.<number> | Float32Array | input vector |
i | number | Element in vector Z to compute softmax for |
k | number | Should be >= 1, typically dimension of Z |