oneAPI Deep Neural Network Library (oneDNN)
Performance library for Deep Learning
1.96.0
LogSoftmax

A primitive to perform logsoftmax. More...

Classes

struct  dnnl::logsoftmax_forward
 Logsoftmax forward propagation primitive. More...
 
struct  dnnl::logsoftmax_backward
 Logsoftmax backward propagation primitive. More...
 

Typedefs

typedef dnnl_softmax_desc_t dnnl_logsoftmax_desc_t
 A descriptor of a LogSoftmax operation. More...
 

Functions

dnnl_status_t DNNL_API dnnl_logsoftmax_forward_desc_init (dnnl_logsoftmax_desc_t *logsoftmax_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, int logsoftmax_axis)
 Initializes a descriptor for logsoftmax forward propagation primitive. More...
 
dnnl_status_t DNNL_API dnnl_logsoftmax_backward_desc_init (dnnl_logsoftmax_desc_t *logsoftmax_desc, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, int logsoftmax_axis)
 Initializes a descriptor for logsoftmax backward propagation primitive. More...
 

Detailed Description

A primitive to perform logsoftmax.

See also
LogSoftmax in developer guide

Typedef Documentation

◆ dnnl_logsoftmax_desc_t

A descriptor of a LogSoftmax operation.

An alias of Softmax structure, but primitive_kind must be dnnl_logsoftmax.

Function Documentation

◆ dnnl_logsoftmax_forward_desc_init()

dnnl_status_t DNNL_API dnnl_logsoftmax_forward_desc_init ( dnnl_logsoftmax_desc_t logsoftmax_desc,
dnnl_prop_kind_t  prop_kind,
const dnnl_memory_desc_t data_desc,
int  logsoftmax_axis 
)

Initializes a descriptor for logsoftmax forward propagation primitive.

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

◆ dnnl_logsoftmax_backward_desc_init()

dnnl_status_t DNNL_API dnnl_logsoftmax_backward_desc_init ( dnnl_logsoftmax_desc_t logsoftmax_desc,
const dnnl_memory_desc_t diff_data_desc,
const dnnl_memory_desc_t data_desc,
int  logsoftmax_axis 
)

Initializes a descriptor for logsoftmax backward propagation primitive.

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