.. index:: pair: struct; dnnl::vanilla_rnn_forward::desc .. _doxid-structdnnl_1_1vanilla__rnn__forward_1_1desc: struct dnnl::vanilla_rnn_forward::desc ====================================== .. toctree:: :hidden: Overview ~~~~~~~~ Descriptor for a vanilla RNN 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:`algorithm` activation, :ref:`rnn_direction` direction, const :ref:`memory::desc`& src_layer_desc, const :ref:`memory::desc`& src_iter_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, :ref:`rnn_flags` flags = :ref:`rnn_flags::undef`, float alpha = 0.0f, float beta = 0.0f ); }; .. _details-structdnnl_1_1vanilla__rnn__forward_1_1desc: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Descriptor for a vanilla RNN forward propagation primitive. Construction ------------ .. index:: pair: function; desc .. _doxid-structdnnl_1_1vanilla__rnn__forward_1_1desc_1ac07f2104b8e611bc745c3b56dd9d8a3c: .. ref-code-block:: cpp :class: doxyrest-title-code-block desc( :ref:`prop_kind` aprop_kind, :ref:`algorithm` activation, :ref:`rnn_direction` direction, const :ref:`memory::desc`& src_layer_desc, const :ref:`memory::desc`& src_iter_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, :ref:`rnn_flags` flags = :ref:`rnn_flags::undef`, float alpha = 0.0f, float beta = 0.0f ) Constructs a descriptor for a vanilla RNN forward propagation primitive. The following arguments may point to a zero memory descriptor: * ``src_iter_desc``, * ``bias_desc``, * ``dst_iter_desc``. This would then indicate that the RNN forward propagation primitive should not use them and should default to zero values instead. .. note:: All memory descriptors except ``src_iter_desc`` 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 `. * - activation - Activation kind. Possible values are :ref:`dnnl::algorithm::eltwise_relu `, :ref:`dnnl::algorithm::eltwise_tanh `, or :ref:`dnnl::algorithm::eltwise_logistic `. * - 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. * - 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. * - flags - Unused. * - alpha - Negative slope if activation is :ref:`dnnl::algorithm::eltwise_relu `. * - beta - Unused.