.. index:: pair: group; LogSoftmax .. _doxid-group__dnnl__api__logsoftmax: LogSoftmax ========== .. toctree:: :hidden: struct_dnnl_logsoftmax_backward.rst struct_dnnl_logsoftmax_forward.rst Overview ~~~~~~~~ A primitive to perform logsoftmax. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // typedefs typedef :ref:`dnnl_softmax_desc_t` :ref:`dnnl_logsoftmax_desc_t`; // structs struct :ref:`dnnl::logsoftmax_backward`; struct :ref:`dnnl::logsoftmax_forward`; // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_logsoftmax_forward_desc_init`( :ref:`dnnl_logsoftmax_desc_t`* logsoftmax_desc, :ref:`dnnl_prop_kind_t` prop_kind, const :ref:`dnnl_memory_desc_t`* data_desc, int logsoftmax_axis ); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_logsoftmax_backward_desc_init`( :ref:`dnnl_logsoftmax_desc_t`* logsoftmax_desc, const :ref:`dnnl_memory_desc_t`* diff_data_desc, const :ref:`dnnl_memory_desc_t`* data_desc, int logsoftmax_axis ); .. _details-group__dnnl__api__logsoftmax: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A primitive to perform logsoftmax. .. rubric:: See also: :ref:`LogSoftmax ` in developer guide Typedefs -------- .. index:: pair: typedef; dnnl_logsoftmax_desc_t .. _doxid-group__dnnl__api__logsoftmax_1ga312b4653a7712a595c96e23cddd7b8d8: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef :ref:`dnnl_softmax_desc_t` dnnl_logsoftmax_desc_t A descriptor of a LogSoftmax operation. An alias of Softmax structure, but primitive_kind must be :ref:`dnnl_logsoftmax `. Global Functions ---------------- .. index:: pair: function; dnnl_logsoftmax_forward_desc_init .. _doxid-group__dnnl__api__logsoftmax_1ga419884428ce50371d2171bc2099acf73: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_logsoftmax_forward_desc_init( :ref:`dnnl_logsoftmax_desc_t`* logsoftmax_desc, :ref:`dnnl_prop_kind_t` prop_kind, const :ref:`dnnl_memory_desc_t`* data_desc, int logsoftmax_axis ) Initializes a descriptor for logsoftmax forward propagation primitive. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - logsoftmax_desc - Output descriptor for a logsoftmax primitive. * - prop_kind - Propagation kind. Possible values are :ref:`dnnl_forward_training ` and :ref:`dnnl_forward_inference `. * - data_desc - Source and destination memory descriptor. * - logsoftmax_axis - Axis over which logsoftmax is computed. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; dnnl_logsoftmax_backward_desc_init .. _doxid-group__dnnl__api__logsoftmax_1ga7c1a3e7de7a86715278ecc84a3354f52: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_logsoftmax_backward_desc_init( :ref:`dnnl_logsoftmax_desc_t`* logsoftmax_desc, const :ref:`dnnl_memory_desc_t`* diff_data_desc, const :ref:`dnnl_memory_desc_t`* data_desc, int logsoftmax_axis ) Initializes a descriptor for logsoftmax backward propagation primitive. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - logsoftmax_desc - Output descriptor for a logsoftmax primitive. * - diff_data_desc - Diff source and diff destination memory descriptors. * - data_desc - Destination memory descriptor. * - logsoftmax_axis - Axis over which softmax is computed. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise.