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

PReLU primitive A primitive to perform PReLU (leaky ReLU with trainable alpha parameter) More...

Classes

struct  dnnl::prelu_forward
 PReLU forward propagation primitive. More...
 
struct  dnnl::prelu_backward
 PReLU backward propagation primitive. More...
 

Functions

dnnl_status_t DNNL_API dnnl_prelu_forward_desc_init (dnnl_prelu_desc_t *prelu_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, const dnnl_memory_desc_t *weights_desc)
 Initializes a descriptor for PReLU (leaky ReLU with trainable alpha parameter) forward propagation primitive. More...
 
dnnl_status_t DNNL_API dnnl_prelu_backward_desc_init (dnnl_prelu_desc_t *prelu_desc, const dnnl_memory_desc_t *data_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *diff_weights_desc)
 Initializes a descriptor for PReLU (leaky ReLU with trainable alpha parameter) backward propagation primitive. More...
 

Detailed Description

PReLU primitive A primitive to perform PReLU (leaky ReLU with trainable alpha parameter)

See also
PReLU in developer guide

Function Documentation

◆ dnnl_prelu_forward_desc_init()

dnnl_status_t DNNL_API dnnl_prelu_forward_desc_init ( dnnl_prelu_desc_t *  prelu_desc,
dnnl_prop_kind_t  prop_kind,
const dnnl_memory_desc_t data_desc,
const dnnl_memory_desc_t weights_desc 
)

Initializes a descriptor for PReLU (leaky ReLU with trainable alpha parameter) forward propagation primitive.

Note
weights descriptor is allowed to be initialized with dnnl_format_tag_any or with format_kind set to dnnl_format_kind_any.
Parameters
prelu_descOutput descriptor for a prelu primitive.
prop_kindPropagation kind. Possible values are dnnl_forward_training and dnnl_forward_inference.
data_descSource and destination memory descriptor.
weights_descAlpha parameters memory descriptor.
Returns
dnnl_success on success and a status describing the error otherwise.

◆ dnnl_prelu_backward_desc_init()

dnnl_status_t DNNL_API dnnl_prelu_backward_desc_init ( dnnl_prelu_desc_t *  prelu_desc,
const dnnl_memory_desc_t data_desc,
const dnnl_memory_desc_t weights_desc,
const dnnl_memory_desc_t diff_data_desc,
const dnnl_memory_desc_t diff_weights_desc 
)

Initializes a descriptor for PReLU (leaky ReLU with trainable alpha parameter) backward propagation primitive.

Note
weights descriptor and diff_weights descriptor are allowed to be initialized with dnnl_format_tag_any or with format_kind set to dnnl_format_kind_any.
Parameters
prelu_descOutput descriptor for a prelu primitive.
data_descSource and destination memory descriptor.
weights_descAlpha parameters memory descriptor.
diff_data_descDiff source and destination memory descriptor.
diff_weights_descDiff alpha parameters memory descriptor.
Returns
dnnl_success on success and a status describing the error otherwise.