.. index:: pair: struct; dnnl::deconvolution_forward::primitive_desc .. _doxid-structdnnl_1_1deconvolution__forward_1_1primitive__desc: struct dnnl::deconvolution_forward::primitive_desc ================================================== .. toctree:: :hidden: Overview ~~~~~~~~ Primitive descriptor for a deconvolution forward propagation primitive. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct primitive_desc: public :ref:`dnnl::primitive_desc` { // construction :ref:`primitive_desc`(); :ref:`primitive_desc`( const :ref:`engine`& aengine, :ref:`prop_kind` aprop_kind, :ref:`algorithm` aalgorithm, const :ref:`memory::desc`& src_desc, const :ref:`memory::desc`& weights_desc, const :ref:`memory::desc`& bias_desc, const :ref:`memory::desc`& dst_desc, const :ref:`memory::dims`& strides, const :ref:`memory::dims`& padding_l, const :ref:`memory::dims`& padding_r, 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:`algorithm` aalgorithm, const :ref:`memory::desc`& src_desc, const :ref:`memory::desc`& weights_desc, const :ref:`memory::desc`& dst_desc, const :ref:`memory::dims`& strides, const :ref:`memory::dims`& padding_l, const :ref:`memory::dims`& padding_r, 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:`algorithm` aalgorithm, const :ref:`memory::desc`& src_desc, const :ref:`memory::desc`& weights_desc, const :ref:`memory::desc`& bias_desc, const :ref:`memory::desc`& dst_desc, const :ref:`memory::dims`& strides, const :ref:`memory::dims`& dilates, const :ref:`memory::dims`& padding_l, const :ref:`memory::dims`& padding_r, 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:`algorithm` aalgorithm, const :ref:`memory::desc`& src_desc, const :ref:`memory::desc`& weights_desc, const :ref:`memory::desc`& dst_desc, const :ref:`memory::dims`& strides, const :ref:`memory::dims`& dilates, const :ref:`memory::dims`& padding_l, const :ref:`memory::dims`& padding_r, 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_desc`() const; :ref:`memory::desc` :ref:`weights_desc`() const; :ref:`memory::desc` :ref:`dst_desc`() const; :ref:`memory::desc` :ref:`bias_desc`() const; :ref:`algorithm` :ref:`get_algorithm`() const; :ref:`prop_kind` :ref:`get_prop_kind`() 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; }; 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`(); .. _details-structdnnl_1_1deconvolution__forward_1_1primitive__desc: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Primitive descriptor for a deconvolution forward propagation primitive. Construction ------------ .. index:: pair: function; primitive_desc .. _doxid-structdnnl_1_1deconvolution__forward_1_1primitive__desc_1a9f4d214e142ef77363abeab7f48ec9c7: .. 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_1deconvolution__forward_1_1primitive__desc_1abb3d27b24b40e6ae1ac7735b99042f01: .. ref-code-block:: cpp :class: doxyrest-title-code-block primitive_desc( const :ref:`engine`& aengine, :ref:`prop_kind` aprop_kind, :ref:`algorithm` aalgorithm, const :ref:`memory::desc`& src_desc, const :ref:`memory::desc`& weights_desc, const :ref:`memory::desc`& bias_desc, const :ref:`memory::desc`& dst_desc, const :ref:`memory::dims`& strides, const :ref:`memory::dims`& padding_l, const :ref:`memory::dims`& padding_r, const :ref:`primitive_attr`& attr = :ref:`default_attr`(), bool allow_empty = false ) Constructs a primitive descriptor for a deconvolution forward propagation primitive with bias. .. note:: All the memory descriptors may be initialized with the :ref:`dnnl::memory::format_tag::any ` value of ``format_tag``. Arrays ``strides``, ``padding_l``, and ``padding_r`` contain values for spatial dimensions only and hence must have the same number of elements as there are spatial dimensions. The order of values is the same as in the tensor: depth (for 3D tensors), height (for 3D and 2D tensors), and width. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - aengine - Engine to use. * - aprop_kind - Propagation kind. Possible values are :ref:`dnnl::prop_kind::forward_training `, and :ref:`dnnl::prop_kind::forward_inference `. * - aalgorithm - Deconvolution algorithm: :ref:`dnnl::algorithm::deconvolution_direct `, and :ref:`dnnl::algorithm::deconvolution_winograd `. * - src_desc - Source memory descriptor. * - weights_desc - Weights memory descriptor. * - bias_desc - Bias memory descriptor. Passing zero memory descriptor disables the bias term. * - dst_desc - Destination memory descriptor. * - strides - Vector of strides for spatial dimension. * - padding_l - Vector of padding values for low indices for each spatial dimension ``([[front,] top,] left)``. * - padding_r - Vector of padding values for high indices for each spatial dimension ``([[back,] bottom,] right)``. * - 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_1deconvolution__forward_1_1primitive__desc_1a68c5ba8bf6701f9436fde25c83fdbefe: .. ref-code-block:: cpp :class: doxyrest-title-code-block primitive_desc( const :ref:`engine`& aengine, :ref:`prop_kind` aprop_kind, :ref:`algorithm` aalgorithm, const :ref:`memory::desc`& src_desc, const :ref:`memory::desc`& weights_desc, const :ref:`memory::desc`& dst_desc, const :ref:`memory::dims`& strides, const :ref:`memory::dims`& padding_l, const :ref:`memory::dims`& padding_r, const :ref:`primitive_attr`& attr = :ref:`default_attr`(), bool allow_empty = false ) Constructs a primitive descriptor for a deconvolution forward propagation primitive without bias. .. note:: All the memory descriptors may be initialized with the :ref:`dnnl::memory::format_tag::any ` value of ``format_tag``. Arrays ``strides``, ``padding_l``, and ``padding_r`` contain values for spatial dimensions only and hence must have the same number of elements as there are spatial dimensions. The order of values is the same as in the tensor: depth (for 3D tensors), height (for 3D and 2D tensors), and width. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - aengine - Engine to use. * - aprop_kind - Propagation kind. Possible values are :ref:`dnnl::prop_kind::forward_training `, and :ref:`dnnl::prop_kind::forward_inference `. * - aalgorithm - Deconvolution algorithm: :ref:`dnnl::algorithm::deconvolution_direct `, and :ref:`dnnl::algorithm::deconvolution_winograd `. * - src_desc - Source memory descriptor. * - weights_desc - Weights memory descriptor. * - dst_desc - Destination memory descriptor. * - strides - Vector of strides for spatial dimension. * - padding_l - Vector of padding values for low indices for each spatial dimension ``([[front,] top,] left)``. * - padding_r - Vector of padding values for high indices for each spatial dimension ``([[back,] bottom,] right)``. * - 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_1deconvolution__forward_1_1primitive__desc_1a5af3e40356e55d92f87c65282145bab7: .. ref-code-block:: cpp :class: doxyrest-title-code-block primitive_desc( const :ref:`engine`& aengine, :ref:`prop_kind` aprop_kind, :ref:`algorithm` aalgorithm, const :ref:`memory::desc`& src_desc, const :ref:`memory::desc`& weights_desc, const :ref:`memory::desc`& bias_desc, const :ref:`memory::desc`& dst_desc, const :ref:`memory::dims`& strides, const :ref:`memory::dims`& dilates, const :ref:`memory::dims`& padding_l, const :ref:`memory::dims`& padding_r, const :ref:`primitive_attr`& attr = :ref:`default_attr`(), bool allow_empty = false ) Constructs a primitive descriptor for a deconvolution forward propagation primitive with bias. .. note:: All the memory descriptors may be initialized with the :ref:`dnnl::memory::format_tag::any ` value of ``format_tag``. Arrays ``strides``, ``dilates``, ``padding_l``, and ``padding_r`` contain values for spatial dimensions only and hence must have the same number of elements as there are spatial dimensions. The order of values is the same as in the tensor: depth (for 3D tensors), height (for 3D and 2D tensors), and width. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - aengine - Engine to use. * - aprop_kind - Propagation kind. Possible values are :ref:`dnnl::prop_kind::forward_training `, and :ref:`dnnl::prop_kind::forward_inference `. * - aalgorithm - Deconvolution algorithm: :ref:`dnnl::algorithm::deconvolution_direct `, and :ref:`dnnl::algorithm::deconvolution_winograd `. * - src_desc - Source memory descriptor. * - weights_desc - Weights memory descriptor. * - bias_desc - Bias memory descriptor. Passing zero memory descriptor disables the bias term. * - dst_desc - Destination memory descriptor. * - strides - Vector of strides for spatial dimension. * - dilates - Dilations for each spatial dimension. A zero value means no dilation in the corresponding dimension. * - padding_l - Vector of padding values for low indices for each spatial dimension ``([[front,] top,] left)``. * - padding_r - Vector of padding values for high indices for each spatial dimension ``([[back,] bottom,] right)``. * - 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_1deconvolution__forward_1_1primitive__desc_1a80cb87f3d875b9da45dbf577d4f3f7d9: .. ref-code-block:: cpp :class: doxyrest-title-code-block primitive_desc( const :ref:`engine`& aengine, :ref:`prop_kind` aprop_kind, :ref:`algorithm` aalgorithm, const :ref:`memory::desc`& src_desc, const :ref:`memory::desc`& weights_desc, const :ref:`memory::desc`& dst_desc, const :ref:`memory::dims`& strides, const :ref:`memory::dims`& dilates, const :ref:`memory::dims`& padding_l, const :ref:`memory::dims`& padding_r, const :ref:`primitive_attr`& attr = :ref:`default_attr`(), bool allow_empty = false ) Constructs a primitive descriptor for a deconvolution forward propagation primitive without bias. .. note:: All the memory descriptors may be initialized with the :ref:`dnnl::memory::format_tag::any ` value of ``format_tag``. Arrays ``strides``, ``dilates``, ``padding_l``, and ``padding_r`` contain values for spatial dimensions only and hence must have the same number of elements as there are spatial dimensions. The order of values is the same as in the tensor: depth (for 3D tensors), height (for 3D and 2D tensors), and width. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - aengine - Engine to use. * - aprop_kind - Propagation kind. Possible values are :ref:`dnnl::prop_kind::forward_training `, and :ref:`dnnl::prop_kind::forward_inference `. * - aalgorithm - Deconvolution algorithm: :ref:`dnnl::algorithm::deconvolution_direct `, and :ref:`dnnl::algorithm::deconvolution_winograd `. * - src_desc - Source memory descriptor. * - weights_desc - Weights memory descriptor. * - dst_desc - Destination memory descriptor. * - strides - Vector of strides for spatial dimension. * - dilates - Dilations for each spatial dimension. A zero value means no dilation in the corresponding dimension. * - padding_l - Vector of padding values for low indices for each spatial dimension ``([[front,] top,] left)``. * - padding_r - Vector of padding values for high indices for each spatial dimension ``([[back,] bottom,] right)``. * - 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_1deconvolution__forward_1_1primitive__desc_1a3c698a13a43520eca307861965bc4b88: .. ref-code-block:: cpp :class: doxyrest-title-code-block primitive_desc(:ref:`dnnl_primitive_desc_t` pd) Constructs a primitive descriptor for a deconvolution forward 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 a deconvolution forward propagation primitive. Methods ------- .. index:: pair: function; src_desc .. _doxid-structdnnl_1_1deconvolution__forward_1_1primitive__desc_1a7740f0f049f5523c2a710c84ce3c607f: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` src_desc() const Returns a source memory descriptor. .. rubric:: Returns: Source memory descriptor. A zero memory descriptor if the primitive does not have a source parameter. .. index:: pair: function; weights_desc .. _doxid-structdnnl_1_1deconvolution__forward_1_1primitive__desc_1acb16abce7a8322135cc4dfdb2835dbed: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` weights_desc() const Returns a weights memory descriptor. .. rubric:: Returns: Weights memory descriptor. A zero memory descriptor if the primitive does not have a weights parameter. .. index:: pair: function; dst_desc .. _doxid-structdnnl_1_1deconvolution__forward_1_1primitive__desc_1a44623950eaf7b10d1022ad29e115c4b4: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` dst_desc() const Returns a destination memory descriptor. .. rubric:: Returns: Destination memory descriptor. A zero memory descriptor if the primitive does not have a destination parameter. .. index:: pair: function; bias_desc .. _doxid-structdnnl_1_1deconvolution__forward_1_1primitive__desc_1aa6d31eafea4a206b4211023555b4c1e1: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::desc` bias_desc() const Returns the bias memory descriptor. .. rubric:: Returns: The bias memory descriptor. A zero memory descriptor of the primitive does not have a bias parameter. .. index:: pair: function; get_algorithm .. _doxid-structdnnl_1_1deconvolution__forward_1_1primitive__desc_1a2418f395430b3cd2c9e0d1eadb34972e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`algorithm` get_algorithm() const Returns an algorithm kind. .. rubric:: Returns: An algorithm kind. :ref:`dnnl::algorithm::undef ` if the primitive does not have an algorithm parameter. .. index:: pair: function; get_prop_kind .. _doxid-structdnnl_1_1deconvolution__forward_1_1primitive__desc_1a938e3cf9bf09f8d61e6d9371d49baed0: .. 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_strides .. _doxid-structdnnl_1_1deconvolution__forward_1_1primitive__desc_1acc9f5e422a102c77de68306422734715: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::dims` get_strides() const Returns strides. .. rubric:: Returns: Strides. An empty :ref:`dnnl::memory::dims ` if the primitive does not have a strides parameter. .. index:: pair: function; get_dilations .. _doxid-structdnnl_1_1deconvolution__forward_1_1primitive__desc_1acedc339d13b3df830c32709eba34e003: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::dims` get_dilations() const Returns dilations. .. rubric:: Returns: Dilations. An empty :ref:`dnnl::memory::dims ` if the primitive does not have a dilations parameter. .. index:: pair: function; get_padding_l .. _doxid-structdnnl_1_1deconvolution__forward_1_1primitive__desc_1a48d6c5d0eabbc144e7d35ce39dc7ad6e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::dims` get_padding_l() const Returns a left padding. .. rubric:: Returns: A left padding. An empty :ref:`dnnl::memory::dims ` if the primitive does not have a left padding parameter. .. index:: pair: function; get_padding_r .. _doxid-structdnnl_1_1deconvolution__forward_1_1primitive__desc_1a8e8420b4b53b512f7d02b8dbaef61384: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`memory::dims` get_padding_r() const Returns a right padding. .. rubric:: Returns: A right padding. An empty :ref:`dnnl::memory::dims ` if the primitive does not have a right padding parameter.