pangolin.interface.softmax

Contents

pangolin.interface.softmax#

pangolin.interface.softmax(a)#

Apply the softmax function to a vector.

The input must be one-dimensional, and the result has the same shape. The current operation does not provide a configurable axis.

Parameters:

a (RVLike) – Input vector.

Return type:

RV

Examples

>>> import pangolin.interface as pi
>>> pi.softmax([1, 2, 3]).shape
(3,)