AIfES 2  2.0.0
ailayer_softmax Struct Reference

General Softmax layer struct. More...

#include <ailayer_softmax.h>

Data Fields

ailayer_t base
 Inherited field members from general ailayer struct.
 
Math functions

Required data type specific math functions

void(* softmax )(const aitensor_t *x, aitensor_t *result)
 Required math function: Softmax. More...
 

Detailed Description

General Softmax layer struct.

Field Documentation

◆ softmax

void(* softmax) (const aitensor_t *x, aitensor_t *result)

Required math function: Softmax.

Requires a math function that calculates the element wise softmax of a tensor:

\[ result_{i} = \frac{e^{x_i}}{\sum_{j=1}^{K} e^{x_j}} \]

Parameters
xN-dimensional tensor (input)
resultN-dimensional tensor (output)

The documentation for this struct was generated from the following file: