dpuRunSoftmax() - 1.1 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2020-03-23
Version
1.1 English

Synopsis

dpuRunSoftmax
(
int8_t *input,
int numClasses, 
int batchSize,
float scale
    )

Arguments

input
The pointer to store softmax input elements in int8_t type.
numClasses
The number of classes that softmax calculation operates on.
batchSize
Batch size for the softmax calculation. This parameter should be specified with the division of the element number by inputs by numClasses.
scale
The scale value applied to the input elements before softmax calculation. This parameter typically can be obtained by using API dpuGetRensorScale().

Description

Perform softmax calculation for the input elements and save the results to output memory buffer. This API will leverage DPU core for acceleration if harden softmax module is available. Run “dexplorer -w” to view DPU signature information.

Returns

NumPy array to hold the result of softmax calculation. Its size is zero in case of any error.

Include File

n2cube.h

Availability

Vitis AI v1.0