.. index:: pair: group; Softmax .. _doxid-group__dnnl__api__softmax: Softmax ======= .. toctree:: :hidden: struct_dnnl_softmax_desc_t.rst struct_dnnl_softmax_backward.rst struct_dnnl_softmax_forward.rst Overview ~~~~~~~~ A primitive to perform softmax. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // structs struct :ref:`dnnl_softmax_desc_t`; struct :ref:`dnnl::softmax_backward`; struct :ref:`dnnl::softmax_forward`; // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_softmax_forward_desc_init`( :ref:`dnnl_softmax_desc_t`* softmax_desc, :ref:`dnnl_prop_kind_t` prop_kind, const :ref:`dnnl_memory_desc_t`* data_desc, int softmax_axis ); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_softmax_backward_desc_init`( :ref:`dnnl_softmax_desc_t`* softmax_desc, const :ref:`dnnl_memory_desc_t`* diff_data_desc, const :ref:`dnnl_memory_desc_t`* data_desc, int softmax_axis ); .. _details-group__dnnl__api__softmax: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A primitive to perform softmax. .. rubric:: See also: :ref:`Softmax ` in developer guide Global Functions ---------------- .. index:: pair: function; dnnl_softmax_forward_desc_init .. _doxid-group__dnnl__api__softmax_1ga6cf7ee9ca39f755a982d82670a7d7bc5: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_softmax_forward_desc_init( :ref:`dnnl_softmax_desc_t`* softmax_desc, :ref:`dnnl_prop_kind_t` prop_kind, const :ref:`dnnl_memory_desc_t`* data_desc, int softmax_axis ) Initializes a descriptor for softmax 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 `. * - data_desc - Source and 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_backward_desc_init .. _doxid-group__dnnl__api__softmax_1ga68baa791cd85c9e3ddd3dbc5889ba0ba: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_softmax_backward_desc_init( :ref:`dnnl_softmax_desc_t`* softmax_desc, const :ref:`dnnl_memory_desc_t`* diff_data_desc, const :ref:`dnnl_memory_desc_t`* data_desc, int softmax_axis ) Initializes a descriptor for softmax backward propagation primitive. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - softmax_desc - Output descriptor for a softmax primitive. * - diff_data_desc - Diff source and diff destination memory descriptors. * - data_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.