SoftMax#

Versioned name: SoftMax-1

Category: Activation

Short description: Reference

OpenVINO description: This OP is as same as OpenVINO OP

Detailed description: Reference

Mathematical Formulation

\[y_{c} = \frac{e^{Z_{c}}}{\sum_{d=1}^{C}e^{Z_{d}}}\]

where \(C\) is a size of tensor along axis dimension.

Attributes:

  • axis

    • Description: axis represents the axis of which the SoftMax is calculated. axis equal 1 is a default value.

    • Range of values: [-r, r-1] where r = rank(input)

    • Type: s64

    • Default value: 1

    • Required: no

Inputs:

  • 1: input - input tensor with enough number of dimension to be compatible with axis attribute. Required.

    • Type: T

Outputs

  • 1: output - the output tensor of the same shape as input tensor.

    • Type: T

Types:

  • T: f32, f16, bf16.

  • Note: Inputs and outputs have the same data type denoted by T. For example, if input is f32 tensor, then all other tensors have f32 data type.