.. index:: pair: struct; dnnl::lstm_forward::desc .. _doxid-structdnnl_1_1lstm__forward_1_1desc: struct dnnl::lstm_forward::desc =============================== .. toctree:: :hidden: Overview ~~~~~~~~ Descriptor for an LSTM forward propagation primitive. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct desc { // fields :ref:`dnnl_rnn_desc_t` :target:`data`; // construction :ref:`desc`( :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, :ref:`rnn_flags` flags = :ref:`rnn_flags::undef` ); :ref:`desc`( :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, :ref:`rnn_flags` flags = :ref:`rnn_flags::undef` ); :ref:`desc`( :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, :ref:`rnn_flags` flags = :ref:`rnn_flags::undef` ); }; .. _details-structdnnl_1_1lstm__forward_1_1desc: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Descriptor for an LSTM forward propagation primitive. Construction ------------ .. index:: pair: function; desc .. _doxid-structdnnl_1_1lstm__forward_1_1desc_1a34bca69c5da0771ca90bdd2c037ceb6b: .. ref-code-block:: cpp :class: doxyrest-title-code-block desc( :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, :ref:`rnn_flags` flags = :ref:`rnn_flags::undef` ) Constructs a descriptor for an LSTM (with or without peephole and with or without projection) forward propagation primitive. The following arguments may point to a zero memory descriptor: * ``src_iter_desc`` together with ``src_iter_c_desc``, * ``weights_peephole_desc``, * ``bias_desc``, * ``dst_iter_desc`` together with ``dst_iter_c_desc``. This would then indicate that the LSTM forward propagation primitive should not use them and should default to zero values instead. The ``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 an :ref:`dnnl::memory::format_tag::any ` value of ``format_tag``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - aprop_kind - Propagation kind. Possible values are :ref:`dnnl::prop_kind::forward_training `, and :ref:`dnnl::prop_kind::forward_inference `. * - 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. * - flags - Unused. .. index:: pair: function; desc .. _doxid-structdnnl_1_1lstm__forward_1_1desc_1a9a621c76d5797ab63e597cf412075cff: .. ref-code-block:: cpp :class: doxyrest-title-code-block desc( :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, :ref:`rnn_flags` flags = :ref:`rnn_flags::undef` ) Constructs a descriptor for an LSTM (with or without peephole) forward propagation primitive. The following arguments may point to a zero memory descriptor: * ``src_iter_desc`` together with ``src_iter_c_desc``, * ``weights_peephole_desc``, * ``bias_desc``, * ``dst_iter_desc`` together with ``dst_iter_c_desc``. This would then indicate that the LSTM forward propagation primitive should not use them and should default to zero values instead. .. note:: All memory descriptors can be initialized with an :ref:`dnnl::memory::format_tag::any ` value of ``format_tag``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - aprop_kind - Propagation kind. Possible values are :ref:`dnnl::prop_kind::forward_training `, and :ref:`dnnl::prop_kind::forward_inference `. * - 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. * - flags - Unused. .. index:: pair: function; desc .. _doxid-structdnnl_1_1lstm__forward_1_1desc_1a2d895c8ee23f15cbfb2cd6b67551673f: .. ref-code-block:: cpp :class: doxyrest-title-code-block desc( :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, :ref:`rnn_flags` flags = :ref:`rnn_flags::undef` ) Constructs a descriptor for an LSTM forward propagation primitive. The following arguments may point to a zero memory descriptor: * ``src_iter_desc`` together with ``src_iter_c_desc``, * ``bias_desc``, * ``dst_iter_desc`` together with ``dst_iter_c_desc``. This would then indicate that the LSTM forward propagation primitive should not use them and should default to zero values instead. .. note:: All memory descriptors can be initialized with an :ref:`dnnl::memory::format_tag::any ` value of ``format_tag``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - aprop_kind - Propagation kind. Possible values are :ref:`dnnl::prop_kind::forward_training `, and :ref:`dnnl::prop_kind::forward_inference `. * - 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. * - flags - Unused.