Deep Neural Network Library (DNNL)  1.3.0
Performance library for Deep Learning
Classes | Functions

A primitive to perform softmax. More...

Classes

struct  dnnl::softmax_forward
 Softmax forward propagation primitive. More...
 
struct  dnnl::softmax_backward
 Softmax backward propagation primitive. More...
 
struct  dnnl_softmax_desc_t
 A descriptor of a Softmax operation. More...
 

Functions

dnnl_status_t DNNL_API dnnl_softmax_forward_desc_init (dnnl_softmax_desc_t *softmax_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, int softmax_axis)
 Initializes a descriptor for softmax forward propagation primitive. More...
 
dnnl_status_t DNNL_API dnnl_softmax_backward_desc_init (dnnl_softmax_desc_t *softmax_desc, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, int softmax_axis)
 Initializes a descriptor for softmax backward propagation primitive. More...
 

Detailed Description

A primitive to perform softmax.

See also
Softmax in developer guide

Function Documentation

◆ dnnl_softmax_forward_desc_init()

dnnl_status_t DNNL_API dnnl_softmax_forward_desc_init ( dnnl_softmax_desc_t softmax_desc,
dnnl_prop_kind_t  prop_kind,
const dnnl_memory_desc_t data_desc,
int  softmax_axis 
)

Initializes a descriptor for softmax forward propagation primitive.

Inputs:

Outputs:

Parameters
softmax_descOutput descriptor for a softmax primitive.
prop_kindPropagation kind. Possible values are dnnl_forward_training and dnnl_forward_inference.
data_descSource and destination memory descriptor.
softmax_axisAxis over which softmax is computed.
Returns
dnnl_success on success and a status describing the error otherwise.

◆ dnnl_softmax_backward_desc_init()

dnnl_status_t DNNL_API dnnl_softmax_backward_desc_init ( dnnl_softmax_desc_t softmax_desc,
const dnnl_memory_desc_t diff_data_desc,
const dnnl_memory_desc_t data_desc,
int  softmax_axis 
)

Initializes a descriptor for softmax backward propagation primitive.

Inputs:

Outputs:

Parameters
softmax_descOutput descriptor for a softmax primitive.
diff_data_descDiff source and diff destination memory descriptors.
data_descDestination memory descriptor.
softmax_axisAxis over which softmax is computed.
Returns
dnnl_success on success and a status describing the error otherwise.