chainer.functions.softmax¶
-
chainer.functions.
softmax
(x, axis=1)[source]¶ Softmax function.
This function computes its softmax along an axis. Let \(x = (x_1, x_2, \dots, x_D)^{\top}\) be the D dimensional index array and \(f(x)\) be the D dimensional input array. For each index \(x\) of the input array \(f(x)\), it computes the probability \(p(x)\) defined as \(p(x) = {\exp(f(x)) \over \sum_{d} \exp(f(x_d))}\).
Parameters: x (Variable) – Input variable. Returns: Output variable. Return type: Variable