oneAPI Deep Neural Network Library (oneDNN)
Performance library for Deep Learning
1.96.0
Resampling

A primitive to compute resampling operation on 1D, 2D or 3D data tensor using Nearest Neighbor, or Linear (Bilinear, Trilinear) interpolation method. More...

Classes

struct  dnnl::resampling_forward
 Resampling forward propagation. More...
 
struct  dnnl::resampling_backward
 Resampling backward propagation primitive. More...
 
struct  dnnl_resampling_desc_t
 A descriptor of resampling operation. More...
 

Functions

dnnl_status_t DNNL_API dnnl_resampling_forward_desc_init (dnnl_resampling_desc_t *resampling_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const float *factors, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *dst_desc)
 Initializes a descriptor for a resampling forward propagation primitive. More...
 
dnnl_status_t DNNL_API dnnl_resampling_backward_desc_init (dnnl_resampling_desc_t *resampling_desc, dnnl_alg_kind_t alg_kind, const float *factors, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *diff_dst_desc)
 Initializes a descriptor for resampling backward propagation primitive. More...
 

Detailed Description

A primitive to compute resampling operation on 1D, 2D or 3D data tensor using Nearest Neighbor, or Linear (Bilinear, Trilinear) interpolation method.

See also
Resampling in developer guide

Function Documentation

◆ dnnl_resampling_forward_desc_init()

dnnl_status_t DNNL_API dnnl_resampling_forward_desc_init ( dnnl_resampling_desc_t resampling_desc,
dnnl_prop_kind_t  prop_kind,
dnnl_alg_kind_t  alg_kind,
const float *  factors,
const dnnl_memory_desc_t src_desc,
const dnnl_memory_desc_t dst_desc 
)

Initializes a descriptor for a resampling forward propagation primitive.

Note
Destination memory descriptor is allowed to be initialized with dnnl_format_tag_any or with format_kind set to dnnl_format_kind_any.
Parameters
resampling_descOutput descriptor for a resampling primitive.
prop_kindPropagation kind. Possible values are dnnl_forward_training and dnnl_forward_inference.
alg_kindresampling algorithm kind: either dnnl_resampling_nearest, or dnnl_resampling_linear.
factorsArray of scaling factors for spatial dimension.
src_descSource memory descriptor.
dst_descDestination memory descriptor.
Returns
dnnl_success on success and a status describing the error otherwise.

◆ dnnl_resampling_backward_desc_init()

dnnl_status_t DNNL_API dnnl_resampling_backward_desc_init ( dnnl_resampling_desc_t resampling_desc,
dnnl_alg_kind_t  alg_kind,
const float *  factors,
const dnnl_memory_desc_t diff_src_desc,
const dnnl_memory_desc_t diff_dst_desc 
)

Initializes a descriptor for resampling backward propagation primitive.

Parameters
resampling_descOutput descriptor for a resampling primitive.
alg_kindresamplinging algorithm kind: either dnnl_resampling_nearest, or dnnl_resampling_linear.
diff_src_descDiff source memory descriptor.
diff_dst_descDiff destination memory descriptor.
factorsArray of scaling factors for spatial dimension.
Returns
dnnl_success on success and a status describing the error otherwise.