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

A primitive to perform local response normalization (LRN) across or within channels. More...

Classes

struct  dnnl::lrn_forward
 Local response normalization (LRN) forward propagation primitive. More...
 
struct  dnnl::lrn_backward
 Local response normalization (LRN) backward propagation primitive. More...
 
struct  dnnl_lrn_desc_t
 A descriptor of a Local Response Normalization (LRN) operation. More...
 

Functions

dnnl_status_t DNNL_API dnnl_lrn_forward_desc_init (dnnl_lrn_desc_t *lrn_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *data_desc, dnnl_dim_t local_size, float alpha, float beta, float k)
 Initializes a descriptor for LRN forward propagation primitive. More...
 
dnnl_status_t DNNL_API dnnl_lrn_backward_desc_init (dnnl_lrn_desc_t *lrn_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, dnnl_dim_t local_size, float alpha, float beta, float k)
 Initializes a descriptor for LRN backward propagation primitive. More...
 

Detailed Description

A primitive to perform local response normalization (LRN) across or within channels.

See also
Local Response Normalization (LRN) in developer guide

Function Documentation

◆ dnnl_lrn_forward_desc_init()

dnnl_status_t DNNL_API dnnl_lrn_forward_desc_init ( dnnl_lrn_desc_t lrn_desc,
dnnl_prop_kind_t  prop_kind,
dnnl_alg_kind_t  alg_kind,
const dnnl_memory_desc_t data_desc,
dnnl_dim_t  local_size,
float  alpha,
float  beta,
float  k 
)

Initializes a descriptor for LRN forward propagation primitive.

Parameters
lrn_descOutput descriptor for a LRN primitive.
prop_kindPropagation kind. Possible values are dnnl_forward_training and dnnl_forward_inference.
alg_kindLRN algorithm kind: either dnnl_lrn_across_channels or dnnl_lrn_within_channel.
data_descSource and destination memory descriptor.
local_sizeRegularization local size.
alphaThe alpha regularization parameter.
betaThe beta regularization parameter.
kThe k regularization parameter.
Returns
dnnl_success on success and a status describing the error otherwise.
Examples:
cnn_inference_f32.c, and cpu_cnn_training_f32.c.

◆ dnnl_lrn_backward_desc_init()

dnnl_status_t DNNL_API dnnl_lrn_backward_desc_init ( dnnl_lrn_desc_t lrn_desc,
dnnl_alg_kind_t  alg_kind,
const dnnl_memory_desc_t diff_data_desc,
const dnnl_memory_desc_t data_desc,
dnnl_dim_t  local_size,
float  alpha,
float  beta,
float  k 
)

Initializes a descriptor for LRN backward propagation primitive.

Parameters
lrn_descOutput descriptor for a LRN primitive.
alg_kindLRN algorithm kind: either dnnl_lrn_across_channels or dnnl_lrn_within_channel.
diff_data_descDiff source and diff destination memory descriptor.
data_descSource memory descriptor.
local_sizeRegularization local size.
alphaThe alpha regularization parameter.
betaThe beta regularization parameter.
kThe k regularization parameter.
Returns
dnnl_success on success and a status describing the error otherwise.
Examples:
cpu_cnn_training_f32.c.