.. index:: pair: group; PReLU .. _doxid-group__dnnl__api__prelu: PReLU ===== .. toctree:: :hidden: 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_backward`; struct :ref:`dnnl::prelu_forward`; // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_prelu_forward_primitive_desc_create`( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`dnnl_prop_kind_t` prop_kind, :ref:`const_dnnl_memory_desc_t` src_desc, :ref:`const_dnnl_memory_desc_t` weights_desc, :ref:`const_dnnl_memory_desc_t` dst_desc, :ref:`const_dnnl_primitive_attr_t` attr ); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_prelu_backward_primitive_desc_create`( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`const_dnnl_memory_desc_t` src_desc, :ref:`const_dnnl_memory_desc_t` weights_desc, :ref:`const_dnnl_memory_desc_t` diff_src_desc, :ref:`const_dnnl_memory_desc_t` diff_weights_desc, :ref:`const_dnnl_memory_desc_t` diff_dst_desc, :ref:`const_dnnl_primitive_desc_t` hint_fwd_pd, :ref:`const_dnnl_primitive_attr_t` attr ); .. _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_primitive_desc_create .. _doxid-group__dnnl__api__prelu_1gaf74409d6e35b9935ee44d355e10e200c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_prelu_forward_primitive_desc_create( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`dnnl_prop_kind_t` prop_kind, :ref:`const_dnnl_memory_desc_t` src_desc, :ref:`const_dnnl_memory_desc_t` weights_desc, :ref:`const_dnnl_memory_desc_t` dst_desc, :ref:`const_dnnl_primitive_attr_t` attr ) Creates a primitive descriptor for a 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 * - primitive_desc - Output primitive descriptor. * - engine - Engine to use. * - prop_kind - Propagation kind. Possible values are :ref:`dnnl_forward_training ` and :ref:`dnnl_forward_inference `. * - src_desc - Source memory descriptor. * - weights_desc - Alpha parameters memory descriptor. * - dst_desc - Destination memory descriptor. * - attr - Primitive attributes (can be NULL). .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; dnnl_prelu_backward_primitive_desc_create .. _doxid-group__dnnl__api__prelu_1ga525d58d10e3e8c17081f750fdf464a52: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_prelu_backward_primitive_desc_create( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`const_dnnl_memory_desc_t` src_desc, :ref:`const_dnnl_memory_desc_t` weights_desc, :ref:`const_dnnl_memory_desc_t` diff_src_desc, :ref:`const_dnnl_memory_desc_t` diff_weights_desc, :ref:`const_dnnl_memory_desc_t` diff_dst_desc, :ref:`const_dnnl_primitive_desc_t` hint_fwd_pd, :ref:`const_dnnl_primitive_attr_t` attr ) Creates a primitive descriptor for a 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 * - primitive_desc - Output primitive descriptor. * - engine - Engine to use. * - src_desc - Source memory descriptor. * - weights_desc - Alpha parameters memory descriptor. * - diff_src_desc - Diff source memory descriptor. * - diff_weights_desc - Diff alpha parameters memory descriptor. * - diff_dst_desc - Diff destination memory descriptor. * - hint_fwd_pd - Primitive descriptor for a respective forward propagation primitive. * - attr - Primitive attributes (can be NULL). .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise.