.. index:: pair: group; Softmax_v2 .. _doxid-group__dnnl__api__softmax__v2: Softmax_v2 ========== .. toctree:: :hidden: struct_dnnl_softmax_v2_desc_t.rst struct_dnnl_softmax_v2_backward.rst struct_dnnl_softmax_v2_forward.rst Overview ~~~~~~~~ A primitive to perform softmax. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // structs struct :ref:`dnnl_softmax_v2_desc_t`; struct :ref:`dnnl::softmax_v2_backward`; struct :ref:`dnnl::softmax_v2_forward`; // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_softmax_v2_forward_desc_init`( :ref:`dnnl_softmax_v2_desc_t`* softmax_desc, :ref:`dnnl_prop_kind_t` prop_kind, :ref:`dnnl_alg_kind_t` alg_kind, const :ref:`dnnl_memory_desc_t`* src_desc, const :ref:`dnnl_memory_desc_t`* dst_desc, int softmax_axis ); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_softmax_v2_backward_desc_init`( :ref:`dnnl_softmax_v2_desc_t`* softmax_desc, :ref:`dnnl_alg_kind_t` alg_kind, const :ref:`dnnl_memory_desc_t`* diff_src_desc, const :ref:`dnnl_memory_desc_t`* diff_dst_desc, const :ref:`dnnl_memory_desc_t`* dst_desc, int softmax_axis ); .. _details-group__dnnl__api__softmax__v2: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A primitive to perform softmax. .. rubric:: See also: :ref:`Softmax ` in developer guide Global Functions ---------------- .. index:: pair: function; dnnl_softmax_v2_forward_desc_init .. _doxid-group__dnnl__api__softmax__v2_1ga27daaa93517d7442a89b711138cf145c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_softmax_v2_forward_desc_init( :ref:`dnnl_softmax_v2_desc_t`* softmax_desc, :ref:`dnnl_prop_kind_t` prop_kind, :ref:`dnnl_alg_kind_t` alg_kind, const :ref:`dnnl_memory_desc_t`* src_desc, const :ref:`dnnl_memory_desc_t`* dst_desc, int softmax_axis ) Initializes a descriptor for softmax v2 forward propagation primitive. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - softmax_desc - Output descriptor for a softmax primitive. * - prop_kind - Propagation kind. Possible values are :ref:`dnnl_forward_training ` and :ref:`dnnl_forward_inference `. * - alg_kind - Softmax algorithm kind: either :ref:`dnnl_softmax_accurate `, or :ref:`dnnl_softmax_log `. * - src_desc - Source memory descriptor. * - dst_desc - Destination memory descriptor. * - softmax_axis - Axis over which softmax is computed. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; dnnl_softmax_v2_backward_desc_init .. _doxid-group__dnnl__api__softmax__v2_1ga7073636827384d8b5778f13025f81915: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_softmax_v2_backward_desc_init( :ref:`dnnl_softmax_v2_desc_t`* softmax_desc, :ref:`dnnl_alg_kind_t` alg_kind, const :ref:`dnnl_memory_desc_t`* diff_src_desc, const :ref:`dnnl_memory_desc_t`* diff_dst_desc, const :ref:`dnnl_memory_desc_t`* dst_desc, int softmax_axis ) Initializes a descriptor for softmax v2 backward propagation primitive. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - softmax_desc - Output descriptor for a softmax primitive. * - alg_kind - Softmax algorithm kind: either :ref:`dnnl_softmax_accurate `, or :ref:`dnnl_softmax_log `. * - diff_src_desc - Diff source memory descriptor. * - diff_dst_desc - Diff destination memory descriptor. * - dst_desc - Destination memory descriptor. * - softmax_axis - Axis over which softmax is computed. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise.