.. index:: pair: struct; dnnl_layer_normalization_v2_desc_t .. _doxid-structdnnl__layer__normalization__v2__desc__t: struct dnnl_layer_normalization_v2_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_v2_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:`src_desc`; :ref:`dnnl_memory_desc_t` :ref:`diff_src_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`; :ref:`dnnl_memory_desc_t` :ref:`dst_desc`; :ref:`dnnl_memory_desc_t` :ref:`diff_dst_desc`; }; .. _details-structdnnl__layer__normalization__v2__desc__t: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A descriptor of a Layer Normalization operation. Fields ------ .. index:: pair: variable; primitive_kind .. _doxid-structdnnl__layer__normalization__v2__desc__t_1a7121daa607de1a7829b8b5e148461211: .. 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_v2 `. .. index:: pair: variable; prop_kind .. _doxid-structdnnl__layer__normalization__v2__desc__t_1a720abf3627abd28a8ab5861c70d4ddeb: .. 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; src_desc .. _doxid-structdnnl__layer__normalization__v2__desc__t_1a2d9dcbe2d4661ae81f56aac94a939f16: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_memory_desc_t` src_desc Source memory descriptor. .. index:: pair: variable; diff_src_desc .. _doxid-structdnnl__layer__normalization__v2__desc__t_1a1e9845b047f484eaf5949f9124ce0a26: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_memory_desc_t` diff_src_desc Source gradient memory descriptor. .. index:: pair: variable; data_scaleshift_desc .. _doxid-structdnnl__layer__normalization__v2__desc__t_1aef471791d3ffb2f9fc341b3ea12ea32c: .. 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__v2__desc__t_1a7e55f9baf3e3c236396e4e8ea9dd0be5: .. 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__v2__desc__t_1ad4bf6d8b4595c16503eada837b7346f6: .. ref-code-block:: cpp :class: doxyrest-title-code-block float layer_norm_epsilon Layer normalization epsilon parameter. .. index:: pair: variable; dst_desc .. _doxid-structdnnl__layer__normalization__v2__desc__t_1a39f9de4730cc22859a05926d5aa4e603: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_memory_desc_t` dst_desc Destination memory descriptor. .. index:: pair: variable; diff_dst_desc .. _doxid-structdnnl__layer__normalization__v2__desc__t_1a7297f4eec633684af7c108e0e3c39a05: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_memory_desc_t` diff_dst_desc Destination gradient memory descriptor.