.. index:: pair: group; LRN .. _doxid-group__dnnl__api__lrn: LRN === .. toctree:: :hidden: struct_dnnl_lrn_backward.rst struct_dnnl_lrn_forward.rst Overview ~~~~~~~~ A primitive to perform local response normalization (LRN) across or within channels. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // structs struct :ref:`dnnl::lrn_backward`; struct :ref:`dnnl::lrn_forward`; // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_lrn_forward_primitive_desc_create`( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`dnnl_prop_kind_t` prop_kind, :ref:`dnnl_alg_kind_t` alg_kind, :ref:`const_dnnl_memory_desc_t` src_desc, :ref:`const_dnnl_memory_desc_t` dst_desc, :ref:`dnnl_dim_t` local_size, float alpha, float beta, float k, :ref:`const_dnnl_primitive_attr_t` attr ); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_lrn_backward_primitive_desc_create`( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`dnnl_alg_kind_t` alg_kind, :ref:`const_dnnl_memory_desc_t` diff_src_desc, :ref:`const_dnnl_memory_desc_t` diff_dst_desc, :ref:`const_dnnl_memory_desc_t` src_desc, :ref:`dnnl_dim_t` local_size, float alpha, float beta, float k, :ref:`const_dnnl_primitive_desc_t` hint_fwd_pd, :ref:`const_dnnl_primitive_attr_t` attr ); .. _details-group__dnnl__api__lrn: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A primitive to perform local response normalization (LRN) across or within channels. .. rubric:: See also: :ref:`Local Response Normalization (LRN) ` in developer guide Global Functions ---------------- .. index:: pair: function; dnnl_lrn_forward_primitive_desc_create .. _doxid-group__dnnl__api__lrn_1ga7d2550452cd5858747686b338cfde252: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_lrn_forward_primitive_desc_create( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`dnnl_prop_kind_t` prop_kind, :ref:`dnnl_alg_kind_t` alg_kind, :ref:`const_dnnl_memory_desc_t` src_desc, :ref:`const_dnnl_memory_desc_t` dst_desc, :ref:`dnnl_dim_t` local_size, float alpha, float beta, float k, :ref:`const_dnnl_primitive_attr_t` attr ) Creates a primitive descriptor for an LRN forward propagation primitive. .. 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 `. * - alg_kind - LRN algorithm kind: either :ref:`dnnl_lrn_across_channels ` or :ref:`dnnl_lrn_within_channel `. * - src_desc - Source memory descriptor. * - dst_desc - Destination memory descriptor. * - local_size - Regularization local size. * - alpha - The alpha regularization parameter. * - beta - The beta regularization parameter. * - k - The k regularization parameter. * - attr - Primitive attributes (can be NULL). .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; dnnl_lrn_backward_primitive_desc_create .. _doxid-group__dnnl__api__lrn_1gafc38999581f962346f08517ef3383617: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_lrn_backward_primitive_desc_create( :ref:`dnnl_primitive_desc_t`* primitive_desc, :ref:`dnnl_engine_t` engine, :ref:`dnnl_alg_kind_t` alg_kind, :ref:`const_dnnl_memory_desc_t` diff_src_desc, :ref:`const_dnnl_memory_desc_t` diff_dst_desc, :ref:`const_dnnl_memory_desc_t` src_desc, :ref:`dnnl_dim_t` local_size, float alpha, float beta, float k, :ref:`const_dnnl_primitive_desc_t` hint_fwd_pd, :ref:`const_dnnl_primitive_attr_t` attr ) Creates a primitive descriptor for an LRN backward propagation primitive. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - primitive_desc - Output primitive_descriptor. * - engine - Engine to use. * - alg_kind - LRN algorithm kind: either :ref:`dnnl_lrn_across_channels ` or :ref:`dnnl_lrn_within_channel `. * - diff_src_desc - Diff source memory descriptor. * - diff_dst_desc - Diff destination memory descriptor. * - src_desc - Source memory descriptor. * - local_size - Regularization local size. * - alpha - The alpha regularization parameter. * - beta - The beta regularization parameter. * - k - The k regularization parameter. * - 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.