.. index:: pair: group; PReLU .. _doxid-group__dnnl__api__prelu: PReLU ===== .. toctree:: :hidden: struct_dnnl_prelu_desc_t.rst struct_dnnl_prelu_backward.rst struct_dnnl_prelu_forward.rst Overview ~~~~~~~~ PReLU primitive A primitive to perform PReLU (leaky ReLU with trainable alpha parameter) :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // structs struct :ref:`dnnl_prelu_desc_t`; struct :ref:`dnnl::prelu_backward`; struct :ref:`dnnl::prelu_forward`; // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_prelu_forward_desc_init`( dnnl_prelu_desc_t* prelu_desc, :ref:`dnnl_prop_kind_t` prop_kind, const :ref:`dnnl_memory_desc_t`* data_desc, const :ref:`dnnl_memory_desc_t`* weights_desc ); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_prelu_backward_desc_init`( dnnl_prelu_desc_t* prelu_desc, const :ref:`dnnl_memory_desc_t`* data_desc, const :ref:`dnnl_memory_desc_t`* weights_desc, const :ref:`dnnl_memory_desc_t`* diff_data_desc, const :ref:`dnnl_memory_desc_t`* diff_weights_desc ); .. _details-group__dnnl__api__prelu: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ PReLU primitive A primitive to perform PReLU (leaky ReLU with trainable alpha parameter) .. rubric:: See also: :ref:`PReLU ` in developer guide Global Functions ---------------- .. index:: pair: function; dnnl_prelu_forward_desc_init .. _doxid-group__dnnl__api__prelu_1ga143df3dad4af0d1108a644601f873798: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_prelu_forward_desc_init( dnnl_prelu_desc_t* prelu_desc, :ref:`dnnl_prop_kind_t` prop_kind, const :ref:`dnnl_memory_desc_t`* data_desc, const :ref:`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 :ref:`dnnl_format_tag_any ` or with format_kind set to :ref:`dnnl_format_kind_any `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - prelu_desc - Output descriptor for a prelu primitive. * - prop_kind - Propagation kind. Possible values are :ref:`dnnl_forward_training ` and :ref:`dnnl_forward_inference `. * - data_desc - Source and destination memory descriptor. * - weights_desc - Alpha parameters memory descriptor. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; dnnl_prelu_backward_desc_init .. _doxid-group__dnnl__api__prelu_1ga2d2899ecb2749974a483f049ea5b111a: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_prelu_backward_desc_init( dnnl_prelu_desc_t* prelu_desc, const :ref:`dnnl_memory_desc_t`* data_desc, const :ref:`dnnl_memory_desc_t`* weights_desc, const :ref:`dnnl_memory_desc_t`* diff_data_desc, const :ref:`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 :ref:`dnnl_format_tag_any ` or with format_kind set to :ref:`dnnl_format_kind_any `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - 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. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise.