Function marian::softmax(Expr, int)

Function Documentation

Expr marian::softmax(Expr x, int axis = -1)

Computes the softmax fuction along the given axis.

Applies the softmax function

\[ \operatorname{softmax}(x_i) = \frac{\exp(x_i)}{\sum_j \exp(x_j)} \]
See

SoftmaxNodeOp