.. index:: pair: struct; dnnl_layer_normalization_desc_t .. _doxid-structdnnl__layer__normalization__desc__t: struct dnnl_layer_normalization_desc_t ====================================== .. toctree:: :hidden: Overview ~~~~~~~~ A descriptor of a Layer Normalization operation. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct dnnl_layer_normalization_desc_t { // fields :ref:`dnnl_primitive_kind_t` :ref:`primitive_kind`; :ref:`dnnl_prop_kind_t` :ref:`prop_kind`; :ref:`dnnl_memory_desc_t` :ref:`data_desc`; :ref:`dnnl_memory_desc_t` :ref:`diff_data_desc`; :ref:`dnnl_memory_desc_t` :ref:`data_scaleshift_desc`; :ref:`dnnl_memory_desc_t` :target:`diff_data_scaleshift_desc`; :ref:`dnnl_memory_desc_t` :ref:`stat_desc`; float :ref:`layer_norm_epsilon`; unsigned :target:`flags`; }; .. _details-structdnnl__layer__normalization__desc__t: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A descriptor of a Layer Normalization operation. Fields ------ .. index:: pair: variable; primitive_kind .. _doxid-structdnnl__layer__normalization__desc__t_1a91a36772ae6a9c48316ff41458cadcf4: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_primitive_kind_t` primitive_kind The kind of primitive. Used for self-identifying the primitive descriptor. Must be :ref:`dnnl_layer_normalization `. .. index:: pair: variable; prop_kind .. _doxid-structdnnl__layer__normalization__desc__t_1a15480bc3b7ef17d6d151258b7a751dca: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_prop_kind_t` prop_kind The kind of propagation. Possible values: :ref:`dnnl_forward_training `, :ref:`dnnl_forward_inference `, :ref:`dnnl_backward `, and :ref:`dnnl_backward_data `. .. index:: pair: variable; data_desc .. _doxid-structdnnl__layer__normalization__desc__t_1af974f20608c034176e52d3f697964cd0: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_memory_desc_t` data_desc Source and destination memory descriptor. .. index:: pair: variable; diff_data_desc .. _doxid-structdnnl__layer__normalization__desc__t_1a02923a3207c9d4ddc7355b967a096f35: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_memory_desc_t` diff_data_desc Source and destination gradient memory descriptor. .. index:: pair: variable; data_scaleshift_desc .. _doxid-structdnnl__layer__normalization__desc__t_1a341586c80c38296776322fce413d159c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_memory_desc_t` data_scaleshift_desc Scale and shift data and gradient memory descriptors. Scaleshift memory descriptor uses 2D :ref:`dnnl_ab ` format[2, normalized_dim] where 1-st dimension contains gamma parameter, 2-nd dimension contains beta parameter. Normalized_dim is equal to the last logical dimension of the data tensor across which normalization is performed. .. index:: pair: variable; stat_desc .. _doxid-structdnnl__layer__normalization__desc__t_1aa4cde3388ff942b1410ca143ccb010d1: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_memory_desc_t` stat_desc Mean and variance data memory descriptors. Statistics (mean and variance) memory descriptor is the k-dimensional tensor where k is equal to data_tensor_ndims - 1 and may have any plain (stride[last_dim] == 1) user-provided format. .. index:: pair: variable; layer_norm_epsilon .. _doxid-structdnnl__layer__normalization__desc__t_1a3b91b83b4fd696879a817dded69ab737: .. ref-code-block:: cpp :class: doxyrest-title-code-block float layer_norm_epsilon Layer normalization epsilon parameter.