Developer Guide and Reference

  • 2022.1
  • 04/11/2022
  • Public Content
Contents

LRN

Overview

A primitive to perform local response normalization (LRN) across or within channels. More…
// structs struct dnnl_lrn_desc_t; struct dnnl::lrn_backward; struct dnnl::lrn_forward; // global 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 ); 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 );

Detailed Documentation

A primitive to perform local response normalization (LRN) across or within channels.
See also:
Global 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.
Parameters:
lrn_desc
Output descriptor for a LRN primitive.
prop_kind
Propagation kind. Possible values are dnnl_forward_training and dnnl_forward_inference.
alg_kind
LRN algorithm kind: either dnnl_lrn_across_channels or dnnl_lrn_within_channel.
data_desc
Source and destination memory descriptor.
local_size
Regularization local size.
alpha
The alpha regularization parameter.
beta
The beta regularization parameter.
k
The k regularization parameter.
Returns:
dnnl_success on success and a status describing the error otherwise.
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_desc
Output descriptor for a LRN primitive.
alg_kind
LRN algorithm kind: either dnnl_lrn_across_channels or dnnl_lrn_within_channel.
diff_data_desc
Diff source and diff destination memory descriptor.
data_desc
Source memory descriptor.
local_size
Regularization local size.
alpha
The alpha regularization parameter.
beta
The beta regularization parameter.
k
The k regularization parameter.
Returns:
dnnl_success on success and a status describing the error otherwise.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.