struct dnnl::resampling_forward::desc

Overview

Descriptor for resampling forward propagation. More…

#include <dnnl.hpp>

struct desc
{
    // fields

    dnnl_resampling_desc_t data;

    // construction

    desc(
        prop_kind aprop_kind,
        algorithm aalgorithm,
        const memory::desc& src_desc,
        const memory::desc& dst_desc
        );

    desc(
        prop_kind aprop_kind,
        algorithm aalgorithm,
        const std::vector<float>& factors,
        const memory::desc& src_desc
        );

    desc(
        prop_kind aprop_kind,
        algorithm aalgorithm,
        const std::vector<float>& factors,
        const memory::desc& src_desc,
        const memory::desc& dst_desc
        );
};

Detailed Documentation

Descriptor for resampling forward propagation.

Construction

desc(
    prop_kind aprop_kind,
    algorithm aalgorithm,
    const memory::desc& src_desc,
    const memory::desc& dst_desc
    )

Constructs a descriptor for a resampling forward propagation primitive using source and destination memory descriptors.

Note

Destination memory descriptor may be initialized with dnnl::memory::format_tag::any value of format_tag.

Parameters:

aprop_kind

Propagation kind. Possible values are dnnl::prop_kind::forward_training, and dnnl::prop_kind::forward_inference.

aalgorithm

resampling algorithm kind: either dnnl::algorithm::resampling_nearest, or dnnl::algorithm::resampling_linear

src_desc

Source memory descriptor.

dst_desc

Destination memory descriptor.

desc(
    prop_kind aprop_kind,
    algorithm aalgorithm,
    const std::vector<float>& factors,
    const memory::desc& src_desc
    )

Constructs a descriptor for a resampling forward propagation primitive using source memory descriptor and factors.

Parameters:

aprop_kind

Propagation kind. Possible values are dnnl::prop_kind::forward_training, and dnnl::prop_kind::forward_inference.

aalgorithm

resampling algorithm kind: either dnnl::algorithm::resampling_nearest, or dnnl::algorithm::resampling_linear

factors

Vector of scaling factors for spatial dimension.

src_desc

Source memory descriptor.

desc(
    prop_kind aprop_kind,
    algorithm aalgorithm,
    const std::vector<float>& factors,
    const memory::desc& src_desc,
    const memory::desc& dst_desc
    )

Constructs a descriptor for a resampling forward propagation primitive.

Note

The destination memory descriptor may be initialized with dnnl::memory::format_tag::any value of format_tag.

Parameters:

aprop_kind

Propagation kind. Possible values are dnnl::prop_kind::forward_training, and dnnl::prop_kind::forward_inference.

aalgorithm

resampling algorithm kind: either dnnl::algorithm::resampling_nearest, or dnnl::algorithm::resampling_linear

factors

Vector of scaling factors for spatial dimension.

src_desc

Source memory descriptor.

dst_desc

Destination memory descriptor.