Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ softmax() [5/5]

template<typename Mat , require_rev_matrix_t< Mat > * = nullptr>
auto stan::math::softmax ( const Mat &  alpha)
inline

Return the softmax of the specified Eigen vector.

Softmax is guaranteed to return a simplex.

Parameters
alphaUnconstrained input vector.
Returns
Softmax of the input.
Exceptions
std::domain_errorIf the input vector is size 0.

Definition at line 28 of file softmax.hpp.