.. index:: pair: struct; dnnl::lstm_backward::primitive_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc: struct dnnl::lstm_backward::primitive_desc ========================================== .. toctree:: :hidden: Overview ~~~~~~~~ Primitive descriptor for an LSTM backward propagation primitive. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct primitive_desc: public :ref:`dnnl::rnn_primitive_desc_base` { // construction :ref:`primitive_desc`(); :ref:`primitive_desc`( const :ref:`engine`& aengine, :ref:`prop_kind` aprop_kind, :ref:`rnn_direction` direction, const :ref:`memory::desc`& src_layer_desc, const :ref:`memory::desc`& src_iter_desc, const :ref:`memory::desc`& src_iter_c_desc, const :ref:`memory::desc`& weights_layer_desc, const :ref:`memory::desc`& weights_iter_desc, const :ref:`memory::desc`& weights_peephole_desc, const :ref:`memory::desc`& weights_projection_desc, const :ref:`memory::desc`& bias_desc, const :ref:`memory::desc`& dst_layer_desc, const :ref:`memory::desc`& dst_iter_desc, const :ref:`memory::desc`& dst_iter_c_desc, const :ref:`memory::desc`& diff_src_layer_desc, const :ref:`memory::desc`& diff_src_iter_desc, const :ref:`memory::desc`& diff_src_iter_c_desc, const :ref:`memory::desc`& diff_weights_layer_desc, const :ref:`memory::desc`& diff_weights_iter_desc, const :ref:`memory::desc`& diff_weights_peephole_desc, const :ref:`memory::desc`& diff_weights_projection_desc, const :ref:`memory::desc`& diff_bias_desc, const :ref:`memory::desc`& diff_dst_layer_desc, const :ref:`memory::desc`& diff_dst_iter_desc, const :ref:`memory::desc`& diff_dst_iter_c_desc, const :ref:`lstm_forward::primitive_desc`& hint_fwd_pd, const :ref:`primitive_attr`& attr = :ref:`default_attr`(), bool allow_empty = false ); :ref:`primitive_desc`( const :ref:`engine`& aengine, :ref:`prop_kind` aprop_kind, :ref:`rnn_direction` direction, const :ref:`memory::desc`& src_layer_desc, const :ref:`memory::desc`& src_iter_desc, const :ref:`memory::desc`& src_iter_c_desc, const :ref:`memory::desc`& weights_layer_desc, const :ref:`memory::desc`& weights_iter_desc, const :ref:`memory::desc`& weights_peephole_desc, const :ref:`memory::desc`& bias_desc, const :ref:`memory::desc`& dst_layer_desc, const :ref:`memory::desc`& dst_iter_desc, const :ref:`memory::desc`& dst_iter_c_desc, const :ref:`memory::desc`& diff_src_layer_desc, const :ref:`memory::desc`& diff_src_iter_desc, const :ref:`memory::desc`& diff_src_iter_c_desc, const :ref:`memory::desc`& diff_weights_layer_desc, const :ref:`memory::desc`& diff_weights_iter_desc, const :ref:`memory::desc`& diff_weights_peephole_desc, const :ref:`memory::desc`& diff_bias_desc, const :ref:`memory::desc`& diff_dst_layer_desc, const :ref:`memory::desc`& diff_dst_iter_desc, const :ref:`memory::desc`& diff_dst_iter_c_desc, const :ref:`lstm_forward::primitive_desc`& hint_fwd_pd, const :ref:`primitive_attr`& attr = :ref:`default_attr`(), bool allow_empty = false ); :ref:`primitive_desc`( const :ref:`engine`& aengine, :ref:`prop_kind` aprop_kind, :ref:`rnn_direction` direction, const :ref:`memory::desc`& src_layer_desc, const :ref:`memory::desc`& src_iter_desc, const :ref:`memory::desc`& src_iter_c_desc, const :ref:`memory::desc`& weights_layer_desc, const :ref:`memory::desc`& weights_iter_desc, const :ref:`memory::desc`& bias_desc, const :ref:`memory::desc`& dst_layer_desc, const :ref:`memory::desc`& dst_iter_desc, const :ref:`memory::desc`& dst_iter_c_desc, const :ref:`memory::desc`& diff_src_layer_desc, const :ref:`memory::desc`& diff_src_iter_desc, const :ref:`memory::desc`& diff_src_iter_c_desc, const :ref:`memory::desc`& diff_weights_layer_desc, const :ref:`memory::desc`& diff_weights_iter_desc, const :ref:`memory::desc`& diff_bias_desc, const :ref:`memory::desc`& diff_dst_layer_desc, const :ref:`memory::desc`& diff_dst_iter_desc, const :ref:`memory::desc`& diff_dst_iter_c_desc, const :ref:`lstm_forward::primitive_desc`& hint_fwd_pd, const :ref:`primitive_attr`& attr = :ref:`default_attr`(), bool allow_empty = false ); :ref:`primitive_desc`(:ref:`dnnl_primitive_desc_t` pd); // methods :ref:`memory::desc` :ref:`src_layer_desc`() const; :ref:`memory::desc` :ref:`src_iter_desc`() const; :ref:`memory::desc` :ref:`src_iter_c_desc`() const; :ref:`memory::desc` :ref:`weights_layer_desc`() const; :ref:`memory::desc` :ref:`weights_iter_desc`() const; :ref:`memory::desc` :ref:`weights_peephole_desc`() const; :ref:`memory::desc` :ref:`weights_projection_desc`() const; :ref:`memory::desc` :ref:`bias_desc`() const; :ref:`memory::desc` :ref:`dst_layer_desc`() const; :ref:`memory::desc` :ref:`dst_iter_desc`() const; :ref:`memory::desc` :ref:`dst_iter_c_desc`() const; :ref:`memory::desc` :ref:`workspace_desc`() const; :ref:`memory::desc` :ref:`diff_src_layer_desc`() const; :ref:`memory::desc` :ref:`diff_src_iter_desc`() const; :ref:`memory::desc` :ref:`diff_src_iter_c_desc`() const; :ref:`memory::desc` :ref:`diff_weights_layer_desc`() const; :ref:`memory::desc` :ref:`diff_weights_iter_desc`() const; :ref:`memory::desc` :ref:`diff_weights_peephole_desc`() const; :ref:`memory::desc` :ref:`diff_weights_projection_desc`() const; :ref:`memory::desc` :ref:`diff_bias_desc`() const; :ref:`memory::desc` :ref:`diff_dst_layer_desc`() const; :ref:`memory::desc` :ref:`diff_dst_iter_desc`() const; :ref:`memory::desc` :ref:`diff_dst_iter_c_desc`() const; :ref:`algorithm` :ref:`get_cell_kind`() const; :ref:`prop_kind` :ref:`get_prop_kind`() const; :ref:`rnn_direction` :ref:`get_direction`() const; }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // methods :ref:`handle`& :ref:`operator =` (const :ref:`handle`&); :ref:`handle`& :ref:`operator =` (:ref:`handle`&&); void :ref:`reset`(T t, bool weak = false); T :ref:`get`(bool allow_empty = false) const; :ref:`operator T` () const; :ref:`operator bool` () const; bool :ref:`operator ==` (const :ref:`handle`& other) const; bool :ref:`operator !=` (const :ref:`handle`& other) const; :ref:`engine` :ref:`get_engine`() const; const char* :ref:`impl_info_str`() const; :ref:`memory::dim` :ref:`query_s64`(:ref:`query` what) const; :ref:`memory::dims` :ref:`get_strides`() const; :ref:`memory::dims` :ref:`get_dilations`() const; :ref:`memory::dims` :ref:`get_padding_l`() const; :ref:`memory::dims` :ref:`get_padding_r`() const; float :ref:`get_epsilon`() const; template T :ref:`get_flags`() const; :ref:`dnnl::algorithm` :ref:`get_algorithm`() const; float :ref:`get_alpha`() const; float :ref:`get_beta`() const; int :ref:`get_axis`() const; :ref:`memory::dim` :ref:`get_local_size`() const; float :ref:`get_k`() const; float :ref:`get_p`() const; std::vector :ref:`get_factors`() const; :ref:`dnnl::algorithm` :ref:`get_cell_kind`() const; :ref:`dnnl::rnn_direction` :ref:`get_direction`() const; :ref:`dnnl::algorithm` :ref:`get_activation_kind`() const; :ref:`memory::dims` :ref:`get_kernel`() const; :ref:`memory::dim` :ref:`get_group_size`() const; :ref:`dnnl::prop_kind` :ref:`get_prop_kind`() const; :ref:`memory::desc` :ref:`query_md`(:ref:`query` what, int idx = 0) const; :ref:`memory::desc` :ref:`src_desc`(int idx) const; :ref:`memory::desc` :ref:`dst_desc`(int idx) const; :ref:`memory::desc` :ref:`weights_desc`(int idx) const; :ref:`memory::desc` :ref:`diff_src_desc`(int idx) const; :ref:`memory::desc` :ref:`diff_dst_desc`(int idx) const; :ref:`memory::desc` :ref:`diff_weights_desc`(int idx) const; :ref:`memory::desc` :ref:`src_desc`() const; :ref:`memory::desc` :ref:`dst_desc`() const; :ref:`memory::desc` :ref:`weights_desc`() const; :ref:`memory::desc` :ref:`diff_src_desc`() const; :ref:`memory::desc` :ref:`diff_dst_desc`() const; :ref:`memory::desc` :ref:`diff_weights_desc`() const; :ref:`memory::desc` :ref:`workspace_desc`() const; :ref:`memory::desc` :ref:`scratchpad_desc`() const; :ref:`engine` :ref:`scratchpad_engine`() const; :ref:`primitive_attr` :ref:`get_primitive_attr`() const; :ref:`dnnl::primitive::kind` :ref:`get_kind`() const; std::vector :ref:`get_cache_blob_id`() const; bool :ref:`next_impl`(); :ref:`primitive_desc_base`(); :ref:`primitive_desc_base`(); :ref:`primitive_desc_base`(); :ref:`primitive_desc_base`(); :ref:`memory::desc` :ref:`src_layer_desc`() const; :ref:`memory::desc` :ref:`augru_attention_desc`() const; :ref:`memory::desc` :ref:`src_iter_desc`() const; :ref:`memory::desc` :ref:`src_iter_c_desc`() const; :ref:`memory::desc` :ref:`weights_layer_desc`() const; :ref:`memory::desc` :ref:`weights_iter_desc`() const; :ref:`memory::desc` :ref:`weights_peephole_desc`() const; :ref:`memory::desc` :ref:`weights_projection_desc`() const; :ref:`memory::desc` :ref:`bias_desc`() const; :ref:`memory::desc` :ref:`dst_layer_desc`() const; :ref:`memory::desc` :ref:`dst_iter_desc`() const; :ref:`memory::desc` :ref:`dst_iter_c_desc`() const; :ref:`memory::desc` :ref:`diff_src_layer_desc`() const; :ref:`memory::desc` :ref:`diff_augru_attention_desc`() const; :ref:`memory::desc` :ref:`diff_src_iter_desc`() const; :ref:`memory::desc` :ref:`diff_src_iter_c_desc`() const; :ref:`memory::desc` :ref:`diff_weights_layer_desc`() const; :ref:`memory::desc` :ref:`diff_weights_iter_desc`() const; :ref:`memory::desc` :ref:`diff_weights_peephole_desc`() const; :ref:`memory::desc` :ref:`diff_weights_projection_desc`() const; :ref:`memory::desc` :ref:`diff_bias_desc`() const; :ref:`memory::desc` :ref:`diff_dst_layer_desc`() const; :ref:`memory::desc` :ref:`diff_dst_iter_desc`() const; :ref:`memory::desc` :ref:`diff_dst_iter_c_desc`() const; :ref:`primitive_desc`(); .. _details-structdnnl_1_1lstm__backward_1_1primitive__desc: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Primitive descriptor for an LSTM backward propagation primitive. Construction ------------ .. index:: pair: function; primitive_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a46152ef35d4c4004ae1878bef29b2775: .. ref-code-block:: cpp :class: doxyrest-title-code-block primitive_desc() Default constructor. Produces an empty object. .. index:: pair: function; primitive_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a8b4cf0b34b6cbd23a78ff94bd0a86b88: .. ref-code-block:: cpp :class: doxyrest-title-code-block primitive_desc( const :ref:`engine`& aengine, :ref:`prop_kind` aprop_kind, :ref:`rnn_direction` direction, const :ref:`memory::desc`& src_layer_desc, const :ref:`memory::desc`& src_iter_desc, const :ref:`memory::desc`& src_iter_c_desc, const :ref:`memory::desc`& weights_layer_desc, const :ref:`memory::desc`& weights_iter_desc, const :ref:`memory::desc`& weights_peephole_desc, const :ref:`memory::desc`& weights_projection_desc, const :ref:`memory::desc`& bias_desc, const :ref:`memory::desc`& dst_layer_desc, const :ref:`memory::desc`& dst_iter_desc, const :ref:`memory::desc`& dst_iter_c_desc, const :ref:`memory::desc`& diff_src_layer_desc, const :ref:`memory::desc`& diff_src_iter_desc, const :ref:`memory::desc`& diff_src_iter_c_desc, const :ref:`memory::desc`& diff_weights_layer_desc, const :ref:`memory::desc`& diff_weights_iter_desc, const :ref:`memory::desc`& diff_weights_peephole_desc, const :ref:`memory::desc`& diff_weights_projection_desc, const :ref:`memory::desc`& diff_bias_desc, const :ref:`memory::desc`& diff_dst_layer_desc, const :ref:`memory::desc`& diff_dst_iter_desc, const :ref:`memory::desc`& diff_dst_iter_c_desc, const :ref:`lstm_forward::primitive_desc`& hint_fwd_pd, const :ref:`primitive_attr`& attr = :ref:`default_attr`(), bool allow_empty = false ) Constructs an LSTM (with or without peephole and with or without projection) primitive descriptor for backward propagation using ``prop_kind``, ``direction``, and memory descriptors. The following arguments may point to a zero memory descriptor: * ``src_iter_desc`` together with ``src_iter_c_desc``, ``diff_src_iter_desc``, and ``diff_src_iter_c_desc``, * ``weights_peephole_desc`` together with ``diff_weights_peephole_desc`` * ``bias_desc`` together with ``diff_bias_desc``, * ``dst_iter_desc`` together with ``dst_iter_c_desc``, ``diff_dst_iter_desc``, and ``diff_dst_iter_c_desc``. This would then indicate that the LSTM backward propagation primitive should not use them and should default to zero values instead. The ``weights_projection_desc`` together with ``diff_weights_projection_desc`` may point to a zero memory descriptor. This would then indicate that the LSTM doesn't have recurrent projection layer. .. note:: All memory descriptors can be initialized with :ref:`dnnl::memory::format_tag::any ` value of ``format_tag``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - aengine - Engine to use. * - aprop_kind - Propagation kind. Must be :ref:`dnnl::prop_kind::backward `. * - direction - RNN direction. See :ref:`dnnl::rnn_direction ` for more info. * - src_layer_desc - Memory descriptor for the input vector. * - src_iter_desc - Memory descriptor for the input recurrent hidden state vector. * - src_iter_c_desc - Memory descriptor for the input recurrent cell state vector. * - weights_layer_desc - Memory descriptor for the weights applied to the layer input. * - weights_iter_desc - Memory descriptor for the weights applied to the recurrent input. * - weights_peephole_desc - Memory descriptor for the weights applied to the cell states (according to the Peephole LSTM formula). * - weights_projection_desc - Memory descriptor for the weights applied to the hidden states to get the recurrent projection (according to the Projection LSTM formula). * - bias_desc - Bias memory descriptor. * - dst_layer_desc - Memory descriptor for the output vector. * - dst_iter_desc - Memory descriptor for the output recurrent hidden state vector. * - dst_iter_c_desc - Memory descriptor for the output recurrent cell state vector. * - diff_src_layer_desc - Memory descriptor for the diff of input vector. * - diff_src_iter_desc - Memory descriptor for the diff of input recurrent hidden state vector. * - diff_src_iter_c_desc - Memory descriptor for the diff of input recurrent cell state vector. * - diff_weights_layer_desc - Memory descriptor for the diff of weights applied to the layer input. * - diff_weights_iter_desc - Memory descriptor for the diff of weights applied to the recurrent input. * - diff_weights_peephole_desc - Memory descriptor for the diff of weights applied to the cell states (according to the Peephole LSTM formula). * - diff_weights_projection_desc - Memory descriptor for the diff of weights applied to the hidden states to get the recurrent projection (according to the Projection LSTM formula). * - diff_bias_desc - Diff bias memory descriptor. * - diff_dst_layer_desc - Memory descriptor for the diff of output vector. * - diff_dst_iter_desc - Memory descriptor for the diff of output recurrent hidden state vector. * - diff_dst_iter_c_desc - Memory descriptor for the diff of output recurrent cell state vector. * - hint_fwd_pd - Primitive descriptor for an LSTM forward propagation primitive. It is used as a hint for deciding which memory format to use. * - attr - Primitive attributes to use. Attributes are optional and default to empty attributes. * - allow_empty - A flag signifying whether construction is allowed to fail without throwing an exception. In this case an empty object will be produced. This flag is optional and defaults to false. .. index:: pair: function; primitive_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1af8f70779488f0bc78b974ecad3dea2f8: .. ref-code-block:: cpp :class: doxyrest-title-code-block primitive_desc( const :ref:`engine`& aengine, :ref:`prop_kind` aprop_kind, :ref:`rnn_direction` direction, const :ref:`memory::desc`& src_layer_desc, const :ref:`memory::desc`& src_iter_desc, const :ref:`memory::desc`& src_iter_c_desc, const :ref:`memory::desc`& weights_layer_desc, const :ref:`memory::desc`& weights_iter_desc, const :ref:`memory::desc`& weights_peephole_desc, const :ref:`memory::desc`& bias_desc, const :ref:`memory::desc`& dst_layer_desc, const :ref:`memory::desc`& dst_iter_desc, const :ref:`memory::desc`& dst_iter_c_desc, const :ref:`memory::desc`& diff_src_layer_desc, const :ref:`memory::desc`& diff_src_iter_desc, const :ref:`memory::desc`& diff_src_iter_c_desc, const :ref:`memory::desc`& diff_weights_layer_desc, const :ref:`memory::desc`& diff_weights_iter_desc, const :ref:`memory::desc`& diff_weights_peephole_desc, const :ref:`memory::desc`& diff_bias_desc, const :ref:`memory::desc`& diff_dst_layer_desc, const :ref:`memory::desc`& diff_dst_iter_desc, const :ref:`memory::desc`& diff_dst_iter_c_desc, const :ref:`lstm_forward::primitive_desc`& hint_fwd_pd, const :ref:`primitive_attr`& attr = :ref:`default_attr`(), bool allow_empty = false ) Constructs an LSTM (with or without peephole) primitive descriptor for backward propagation using ``prop_kind``, ``direction``, and memory descriptors. The following arguments may point to a zero memory descriptor: * ``src_iter_desc`` together with ``src_iter_c_desc``, ``diff_src_iter_desc``, and ``diff_src_iter_c_desc``, * ``weights_peephole_desc`` together with ``diff_weights_peephole_desc`` * ``bias_desc`` together with ``diff_bias_desc``, * ``dst_iter_desc`` together with ``dst_iter_c_desc``, ``diff_dst_iter_desc``, and ``diff_dst_iter_c_desc``. This would then indicate that the LSTM backward propagation primitive should not use them and should default to zero values instead. .. note:: All memory descriptors may be initialized with :ref:`dnnl::memory::format_tag::any ` value of ``format_tag``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - aengine - Engine to use. * - aprop_kind - Propagation kind. Must be :ref:`dnnl::prop_kind::backward `. * - direction - RNN direction. See :ref:`dnnl::rnn_direction ` for more info. * - src_layer_desc - Memory descriptor for the input vector. * - src_iter_desc - Memory descriptor for the input recurrent hidden state vector. * - src_iter_c_desc - Memory descriptor for the input recurrent cell state vector. * - weights_layer_desc - Memory descriptor for the weights applied to the layer input. * - weights_iter_desc - Memory descriptor for the weights applied to the recurrent input. * - weights_peephole_desc - Memory descriptor for the weights applied to the cell states (according to the Peephole LSTM formula). * - bias_desc - Bias memory descriptor. * - dst_layer_desc - Memory descriptor for the output vector. * - dst_iter_desc - Memory descriptor for the output recurrent hidden state vector. * - dst_iter_c_desc - Memory descriptor for the output recurrent cell state vector. * - diff_src_layer_desc - Memory descriptor for the diff of input vector. * - diff_src_iter_desc - Memory descriptor for the diff of input recurrent hidden state vector. * - diff_src_iter_c_desc - Memory descriptor for the diff of input recurrent cell state vector. * - diff_weights_layer_desc - Memory descriptor for the diff of weights applied to the layer input. * - diff_weights_iter_desc - Memory descriptor for the diff of weights applied to the recurrent input. * - diff_weights_peephole_desc - Memory descriptor for the diff of weights applied to the cell states (according to the Peephole LSTM formula). * - diff_bias_desc - Diff bias memory descriptor. * - diff_dst_layer_desc - Memory descriptor for the diff of output vector. * - diff_dst_iter_desc - Memory descriptor for the diff of output recurrent hidden state vector. * - diff_dst_iter_c_desc - Memory descriptor for the diff of output recurrent cell state vector. * - hint_fwd_pd - Primitive descriptor for an LSTM forward propagation primitive. It is used as a hint for deciding which memory format to use. * - attr - Primitive attributes to use. Attributes are optional and default to empty attributes. * - allow_empty - A flag signifying whether construction is allowed to fail without throwing an exception. In this case an empty object will be produced. This flag is optional and defaults to false. .. index:: pair: function; primitive_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1aab54bea7c7f2144212b8838dc72949c4: .. ref-code-block:: cpp :class: doxyrest-title-code-block primitive_desc( const :ref:`engine`& aengine, :ref:`prop_kind` aprop_kind, :ref:`rnn_direction` direction, const :ref:`memory::desc`& src_layer_desc, const :ref:`memory::desc`& src_iter_desc, const :ref:`memory::desc`& src_iter_c_desc, const :ref:`memory::desc`& weights_layer_desc, const :ref:`memory::desc`& weights_iter_desc, const :ref:`memory::desc`& bias_desc, const :ref:`memory::desc`& dst_layer_desc, const :ref:`memory::desc`& dst_iter_desc, const :ref:`memory::desc`& dst_iter_c_desc, const :ref:`memory::desc`& diff_src_layer_desc, const :ref:`memory::desc`& diff_src_iter_desc, const :ref:`memory::desc`& diff_src_iter_c_desc, const :ref:`memory::desc`& diff_weights_layer_desc, const :ref:`memory::desc`& diff_weights_iter_desc, const :ref:`memory::desc`& diff_bias_desc, const :ref:`memory::desc`& diff_dst_layer_desc, const :ref:`memory::desc`& diff_dst_iter_desc, const :ref:`memory::desc`& diff_dst_iter_c_desc, const :ref:`lstm_forward::primitive_desc`& hint_fwd_pd, const :ref:`primitive_attr`& attr = :ref:`default_attr`(), bool allow_empty = false ) Constructs an LSTM primitive descriptor for backward propagation using ``prop_kind``, ``direction``, and memory descriptors. The following arguments may point to a zero memory descriptor: * ``src_iter_desc`` together with ``src_iter_c_desc``, ``diff_src_iter_desc``, and ``diff_src_iter_c_desc``, * ``bias_desc`` together with ``diff_bias_desc``, * ``dst_iter_desc`` together with ``dst_iter_c_desc``, ``diff_dst_iter_desc``, and ``diff_dst_iter_c_desc``. This would then indicate that the LSTM backward propagation primitive should not use them and should default to zero values instead. .. note:: All memory descriptors may be initialized with :ref:`dnnl::memory::format_tag::any ` value of ``format_tag``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - aengine - Engine to use. * - aprop_kind - Propagation kind. Must be :ref:`dnnl::prop_kind::backward `. * - direction - RNN direction. See :ref:`dnnl::rnn_direction ` for more info. * - src_layer_desc - Memory descriptor for the input vector. * - src_iter_desc - Memory descriptor for the input recurrent hidden state vector. * - src_iter_c_desc - Memory descriptor for the input recurrent cell state vector. * - weights_layer_desc - Memory descriptor for the weights applied to the layer input. * - weights_iter_desc - Memory descriptor for the weights applied to the recurrent input. * - bias_desc - Bias memory descriptor. * - dst_layer_desc - Memory descriptor for the output vector. * - dst_iter_desc - Memory descriptor for the output recurrent hidden state vector. * - dst_iter_c_desc - Memory descriptor for the output recurrent cell state vector. * - diff_src_layer_desc - Memory descriptor for the diff of input vector. * - diff_src_iter_desc - Memory descriptor for the diff of input recurrent hidden state vector. * - diff_src_iter_c_desc - Memory descriptor for the diff of input recurrent cell state vector. * - diff_weights_layer_desc - Memory descriptor for the diff of weights applied to the layer input. * - diff_weights_iter_desc - Memory descriptor for the diff of weights applied to the recurrent input. * - diff_bias_desc - Diff bias memory descriptor. * - diff_dst_layer_desc - Memory descriptor for the diff of output vector. * - diff_dst_iter_desc - Memory descriptor for the diff of output recurrent hidden state vector. * - diff_dst_iter_c_desc - Memory descriptor for the diff of output recurrent cell state vector. * - hint_fwd_pd - Primitive descriptor for a convolution forward propagation primitive. It is used as a hint for deciding which memory format to use. * - attr - Primitive attributes to use. Attributes are optional and default to empty attributes. * - allow_empty - A flag signifying whether construction is allowed to fail without throwing an exception. In this case an empty object will be produced. This flag is optional and defaults to false. .. index:: pair: function; primitive_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a33683f73c54c3cdfadccb169095b15a3: .. ref-code-block:: cpp :class: doxyrest-title-code-block primitive_desc(:ref:`dnnl_primitive_desc_t` pd) Constructs a primitive descriptor for an LSTM backward propagation primitive from a C API primitive descriptor that must have a matching kind. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - pd - C API primitive descriptor for an LSTM backward propagation primitive. Methods ------- .. index:: pair: function; src_layer_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a3659b46ba6d6d04a7ff416bb813c39fc: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` src_layer_desc() const Returns source layer memory descriptor. .. rubric:: Returns: Source layer memory descriptor. .. index:: pair: function; src_iter_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a6adf5abfc5e0d64eb26713c0d2a5aed6: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` src_iter_desc() const Returns source iteration memory descriptor. .. rubric:: Returns: Source iteration memory descriptor. A zero memory descriptor if the primitive does not have a source iteration parameter. .. index:: pair: function; src_iter_c_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1aa5b5b2c30ac63d88b14df056b4706cca: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` src_iter_c_desc() const Returns source iteration memory descriptor. .. rubric:: Returns: Source iteration memory descriptor. A zero memory descriptor if the primitive does not have a source iteration parameter. .. index:: pair: function; weights_layer_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1ace7359f78f3e0cf9c80412ce130dd144: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` weights_layer_desc() const Returns weights layer memory descriptor. .. rubric:: Returns: Weights layer memory descriptor. .. index:: pair: function; weights_iter_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a0daa23fec7194553abac9535716bc6e1: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` weights_iter_desc() const Returns weights iteration memory descriptor. .. rubric:: Returns: Weights iteration memory descriptor. .. index:: pair: function; weights_peephole_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a31ef24c4725596d731610fb0ff51766a: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` weights_peephole_desc() const Returns weights peephole memory descriptor. .. rubric:: Returns: Weights peephole memory descriptor. .. index:: pair: function; weights_projection_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a78c5499dfaf6dc0a3157ca2f6a8e1a90: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` weights_projection_desc() const Returns weights projection memory descriptor. .. rubric:: Returns: Weights projection memory descriptor. .. index:: pair: function; bias_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a97d40d6d41f51d3985db0ddf5c6fe3d0: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` bias_desc() const Returns bias memory descriptor. .. rubric:: Returns: Bias memory descriptor. A zero memory descriptor if the primitive does not have a bias parameter. .. index:: pair: function; dst_layer_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1aa62fe0ea10ca14021330599994538def: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` dst_layer_desc() const Returns destination layer memory descriptor. .. rubric:: Returns: Destination layer memory descriptor. .. index:: pair: function; dst_iter_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a3bd545695c4d625c9856520789a0e34e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` dst_iter_desc() const Returns destination iteration memory descriptor. .. rubric:: Returns: Destination iteration memory descriptor. A zero memory descriptor if the primitive does not have a destination iteration parameter. .. index:: pair: function; dst_iter_c_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a35275df9da984cdcd135b30941b0766c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` dst_iter_c_desc() const Returns source iteration memory descriptor. .. rubric:: Returns: Source iteration memory descriptor. A zero memory descriptor if the primitive does not have a source iteration parameter. .. index:: pair: function; workspace_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1af661a9e27013725a9fdf6aaba6a7b06a: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` workspace_desc() const Returns the workspace memory descriptor. .. rubric:: Returns: Workspace memory descriptor. A zero memory descriptor if the primitive does not require workspace parameter. .. index:: pair: function; diff_src_layer_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a5d639c4e986db14577b74890579789fd: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` diff_src_layer_desc() const Returns diff source layer memory descriptor. .. rubric:: Returns: Diff source layer memory descriptor. .. index:: pair: function; diff_src_iter_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1ab2bdb5e6b5696c425582d0b5948cbfd3: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` diff_src_iter_desc() const Returns diff source iteration memory descriptor. .. rubric:: Returns: Diff source iteration memory descriptor. A zero memory descriptor if the primitive does not have a diff source iteration parameter. .. index:: pair: function; diff_src_iter_c_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1af66e2af6de27f737d17c4d05d1b5714f: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` diff_src_iter_c_desc() const Returns diff source recurrent cell state memory descriptor. .. rubric:: Returns: Diff source recurrent cell state memory descriptor. .. index:: pair: function; diff_weights_layer_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1aed6c10c83a400320aa797724855914e3: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` diff_weights_layer_desc() const Returns diff weights layer memory descriptor. .. rubric:: Returns: Diff weights layer memory descriptor. .. index:: pair: function; diff_weights_iter_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a7790dd3353fd2a9665c55b5dbb2c9792: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` diff_weights_iter_desc() const Returns diff weights iteration memory descriptor. .. rubric:: Returns: Diff weights iteration memory descriptor. .. index:: pair: function; diff_weights_peephole_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a3456c5e8581033f6e68d612aa65164f3: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` diff_weights_peephole_desc() const Returns diff weights peephole memory descriptor. .. rubric:: Returns: Diff weights peephole memory descriptor. .. index:: pair: function; diff_weights_projection_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a12d6ff7c98071f23fac5a3607e65ce87: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` diff_weights_projection_desc() const Returns diff weights projection memory descriptor. .. rubric:: Returns: Diff weights projection memory descriptor. .. index:: pair: function; diff_bias_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a7f9abbdefe0dd122ee9afaa7445813d1: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` diff_bias_desc() const Returns diff bias memory descriptor. .. rubric:: Returns: Diff bias memory descriptor. A zero memory descriptor if the primitive does not have a diff bias parameter. .. index:: pair: function; diff_dst_layer_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1ac56eccc1f7c254ad7a612561221bc2c4: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` diff_dst_layer_desc() const Returns diff destination layer memory descriptor. .. rubric:: Returns: Diff destination layer memory descriptor. .. index:: pair: function; diff_dst_iter_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a0ff4550a4cffded7a5ed94fb8746a4d4: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` diff_dst_iter_desc() const Returns diff destination iteration memory descriptor. .. rubric:: Returns: Diff destination iteration memory descriptor. A zero memory descriptor if the primitive does not have a diff destination iteration parameter. .. index:: pair: function; diff_dst_iter_c_desc .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1aaa5aaba04fdad31a2cb86f59738a6e89: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` diff_dst_iter_c_desc() const Returns diff destination recurrent cell state memory descriptor. .. rubric:: Returns: Diff destination recurrent cell state memory descriptor. .. index:: pair: function; get_cell_kind .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a20da5507cdf2ac94cd8b35948ca9277f: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`algorithm` get_cell_kind() const Returns an RNN cell kind parameter. .. rubric:: Returns: An RNN cell kind parameter. :ref:`dnnl::algorithm::undef ` if the primitive does not have an RNN cell kind parameter. .. index:: pair: function; get_prop_kind .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1a68499d8c8d2a0a2aa1ea0faf59557ef5: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`prop_kind` get_prop_kind() const Returns a propagation kind. .. rubric:: Returns: A propagation kind. :ref:`dnnl::prop_kind::undef ` if the primitive does not have a propagation parameter. .. index:: pair: function; get_direction .. _doxid-structdnnl_1_1lstm__backward_1_1primitive__desc_1aa97c4190193cd6858fcc28f220cd594e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`rnn_direction` get_direction() const Returns an RNN direction parameter. .. rubric:: Returns: An RNN direction parameter. :ref:`dnnl::rnn_direction::undef ` if the primitive does not have an RNN direction parameter.