Developer Guide and Reference

  • 2022.1
  • 04/11/2022
  • Public Content
Contents

PReLU

Overview

PReLU primitive A primitive to perform PReLU (leaky ReLU with trainable alpha parameter)
// structs struct dnnl_prelu_desc_t; struct dnnl::prelu_backward; struct dnnl::prelu_forward; // global 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 ); 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 );

Detailed Documentation

PReLU primitive A primitive to perform PReLU (leaky ReLU with trainable alpha parameter)
See also:
PReLU in developer guide
Global 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.
weights descriptor is allowed to be initialized with dnnl_format_tag_any or with format_kind set to dnnl_format_kind_any.
Parameters:
prelu_desc
Output descriptor for a prelu primitive.
prop_kind
Propagation kind. Possible values are dnnl_forward_training and dnnl_forward_inference.
data_desc
Source and destination memory descriptor.
weights_desc
Alpha parameters memory descriptor.
Returns:
dnnl_success on success and a status describing the error otherwise.
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.
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_desc
Output descriptor for a prelu primitive.
data_desc
Source and destination memory descriptor.
weights_desc
Alpha parameters memory descriptor.
diff_data_desc
Diff source and destination memory descriptor.
diff_weights_desc
Diff alpha parameters memory descriptor.
Returns:
dnnl_success on success and a status describing the error otherwise.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.